]> git.sur5r.net Git - openldap/commitdiff
Make strtok_quote treat the character following \ as a normal character.
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 23 Feb 1999 15:40:18 +0000 (15:40 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 23 Feb 1999 15:40:18 +0000 (15:40 +0000)
servers/slapd/config.c
servers/slurpd/config.c

index 28005b2153e540a8a35b049f063455abd60bbfde..a62d7f11b4821a497bdf08e026155deba07f4d8d 100644 (file)
@@ -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:
index 47d8fb419add4b00f68b308c65df6cf7e9e24d5f..2dc50aa357fd087578bc391e4c512c900433df76 100644 (file)
@@ -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: