From: Kurt Zeilenga Date: Thu, 3 Feb 2000 22:28:12 +0000 (+0000) Subject: Use required form if value is zero length, eg "attr-desc:". X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3200 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=25af82b3eacbfce4953c51fb096a4deb227a3d56;p=openldap Use required form if value is zero length, eg "attr-desc:". Use BASE64 if attr-desc includes ";binary" --- diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index edec31540d..2030624313 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -349,6 +349,11 @@ ldif_sput( } #endif + if( vlen == 0 ) { + *(*out)++ = '\n'; + return; + } + switch( type ) { case LDIF_PUT_NOVALUE: *(*out)++ = '\n'; @@ -395,16 +400,14 @@ ldif_sput( *(*out)++ = ' '; len++; - if( vlen == 0 ) { - *(*out)++ = '\n'; - return; - } - stop = (const unsigned char *) (val + vlen); if ( type == LDIF_PUT_VALUE && isgraph( val[0] ) && val[0] != ':' && val[0] != '<' && isgraph( val[vlen-1] ) +#ifndef LDAP_BINARY_DEBUG + && strstr( name, ";binary" ) == NULL +#endif #ifndef LDAP_PASSWD_DEBUG && strcasecmp( name, "userPassword" ) != 0 /* encode userPassword */ && strcasecmp( name, "2.5.4.35" ) != 0 /* encode userPassword */