]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/config.c
Added support for newSuperior.
[openldap] / servers / slurpd / config.c
index 8fa21f67524ae4c06b3c485b2d08052c0f5157a3..247910bfccf9de6ea317386178d83242da36a901 100644 (file)
@@ -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;