]> git.sur5r.net Git - openldap/commitdiff
Fix CR/LF handling
authorKurt Zeilenga <kurt@openldap.org>
Thu, 27 Sep 2001 22:10:04 +0000 (22:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 27 Sep 2001 22:10:04 +0000 (22:10 +0000)
servers/slapd/config.c

index c6b5e0a5a3bda0140338a9c0189ab021cd9c891c..26a8cce59876deaa3a556fb5c868d02f772e4cc5 100644 (file)
@@ -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] ) ) {