]> git.sur5r.net Git - openldap/commitdiff
ITS#302 ldif fix. Treat value with only continuation markers
authorKurt Zeilenga <kurt@openldap.org>
Fri, 24 Sep 1999 02:30:33 +0000 (02:30 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 24 Sep 1999 02:30:33 +0000 (02:30 +0000)
as an empty value.  Complain, of course, as this isn't valid LDIF.

libraries/libldif/line64.c

index f2a8e995ed055f28793cb7614ffa7d2497a09084..b02cf8f4b2c01a989c5587a794de07310664f73c 100644 (file)
@@ -135,6 +135,13 @@ ldif_parse_line(
                s++;
        }
 
+       /* check for continued line markers that should be deleted */
+       for ( p = s, d = s; *p; p++ ) {
+               if ( *p != CONTINUED_LINE_MARKER )
+                       *d++ = *p;
+       }
+       *d = '\0';
+
        /* if no value is present, error out */
        if ( *s == '\0' ) {
                ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
@@ -145,13 +152,6 @@ ldif_parse_line(
                goto done;
        }
 
-       /* check for continued line markers that should be deleted */
-       for ( p = s, d = s; *p; p++ ) {
-               if ( *p != CONTINUED_LINE_MARKER )
-                       *d++ = *p;
-       }
-       *d = '\0';
-
        if ( b64 ) {
                char *byte = s;