From: Kurt Zeilenga Date: Thu, 27 Sep 2001 22:10:04 +0000 (+0000) Subject: Fix CR/LF handling X-Git-Tag: OPENLDAP_REL_ENG_2_0_16~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4cdd5c184b46e17c8dddadc7d8a8c9f796b80659;p=openldap Fix CR/LF handling --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index c6b5e0a5a3..26a8cce598 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -16,7 +16,7 @@ #include "ldap_pvt.h" #include "slap.h" -#define MAXARGS 200 +#define MAXARGS 500 /* * defaults for various global variables @@ -1326,7 +1326,9 @@ fp_getline( FILE *fp, int *lineno ) } while ( fgets( buf, sizeof(buf), fp ) != NULL ) { + /* trim off \r\n or \n */ if ( (p = strchr( buf, '\n' )) != NULL ) { + if( p > buf && p[-1] == '\r' ) --p; *p = '\0'; } if ( ! isspace( (unsigned char) buf[0] ) ) {