Was rejecting "-\r\n" in input LDIF
line[++len] = '\0';
}
+ /* Squash \r\n to \n */
+ if ( len > 1 && line[len-2] == '\r' ) {
+ len--;
+ line[len-1] = '\n';
+ }
+
if ( last_ch == '\n' ) {
(*lno)++;
- if ( line[0] == '\n' ||
- ( line[0] == '\r' && line[1] == '\n' )) {
+ if ( line[0] == '\n' ) {
if ( !found_entry ) {
lcur = 0;
top_comment = 0;
len--;
line[len] = '\0';
}
- if ( line[len-1] == '\r' ) {
- len--;
- line[len] = '\0';
- }
ptr = line + STRLENOF("include:");
while (isspace((unsigned char) *ptr)) ptr++;