From: Hallvard Furuseth Date: Tue, 23 Feb 1999 15:40:18 +0000 (+0000) Subject: Make strtok_quote treat the character following \ as a normal character. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~545 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b40ed488232853c65accdadb549e88f7f57fc2c;p=openldap Make strtok_quote treat the character following \ as a normal character. --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 28005b2153..a62d7f11b4 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -603,7 +603,11 @@ strtok_quote( char *line, char *sep ) break; case '\\': - SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 ); + if ( next[1] ) { + SAFEMEMCPY( next, + next + 1, strlen( next + 1 ) + 1 ); + next++; /* dont parse the escaped character */ + } break; default: diff --git a/servers/slurpd/config.c b/servers/slurpd/config.c index 47d8fb419a..2dc50aa357 100644 --- a/servers/slurpd/config.c +++ b/servers/slurpd/config.c @@ -177,7 +177,10 @@ strtok_quote( break; case '\\': - SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 ); + if ( next[1] ) { + SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 ); + next++; /* dont parse the escaped character */ + } break; default: