]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/config.c
Kill lber_debug
[openldap] / servers / slurpd / config.c
index 8fa21f67524ae4c06b3c485b2d08052c0f5157a3..e9b5d7e7c1600fd75602cdc0c7973e64a35520db 100644 (file)
@@ -18,8 +18,8 @@
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
 
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/socket.h>
 #include <ac/ctype.h>
@@ -173,11 +173,13 @@ strtok_quote(
            } else {
                inquote = 1;
            }
-           strcpy( next, next + 1 );
+           SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
            break;
 
        case '\\':
-           strcpy( next, next + 1 );
+           if ( next[1] )
+               SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
+           next++;             /* dont parse the escaped character */
            break;
 
        default:
@@ -339,7 +341,7 @@ parse_replica_line(
                ri->ri_port = atoi( hp );
            }
            if ( ri->ri_port <= 0 ) {
-               ri->ri_port = LDAP_PORT;
+               ri->ri_port = 0;
            }
            ri->ri_hostname = strdup( val );
            gots |= GOT_HOST;