https://bugs.openldap.org/show_bug.cgi?id=9579
Issue ID: 9579 Summary: ldif_read_record(): incorrect parsing of EOF Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: grapvar@gmail.com Target Milestone: ---
libraries/libldap/ldif.c:829
/* Squash \r\n to \n */ if ( len > 1 && line[len-2] == '\r' ) { len--; line[len-1] = '\n'; }
assumes “line” buffer has always been terminated by \n, and makes invalid transforms of these ends of file:
...X\r ~> ...X\r\n ...X\rY ~> ...X\n
https://bugs.openldap.org/show_bug.cgi?id=9579
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to Konstantin Andreev from comment #0)
libraries/libldap/ldif.c:829
/* Squash \r\n to \n */ if ( len > 1 && line[len-2] == '\r' ) { len--; line[len-1] = '\n'; }
assumes “line” buffer has always been terminated by \n, and makes invalid transforms of these ends of file:
...X\r ~> ...X\r\n ...X\rY ~> ...X\n
Sounds like garbage in / garbage out. Any such ends of file are already invalid.
https://bugs.openldap.org/show_bug.cgi?id=9579
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
https://bugs.openldap.org/show_bug.cgi?id=9579
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- Marking invalid unless a valid use case can be defined.