From: Pierangelo Masarati Date: Wed, 13 Feb 2002 22:49:03 +0000 (+0000) Subject: disallow unescaped NULs in UTF-8 string values X-Git-Tag: OPENLDAP_REL_ENG_2_1_BP~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32e48d9e4d4b31e0763576bda066ab908a91d797;p=openldap disallow unescaped NULs in UTF-8 string values --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 15980e2c2c..c162fe724a 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -1386,6 +1386,9 @@ str2strval( const char *str, ber_len_t stoplen, struct berval *val, const char * return( 1 ); } else if (!LDAP_DN_ASCII_PRINTABLE( p[ 0 ] ) ) { + if ( p[ 0 ] == '\0' ) { + return( 1 ); + } *retFlags = LDAP_AVA_NONPRINTABLE; } else if ( ( LDAP_DN_LDAP( flags ) && LDAP_DN_VALUE_END_V2( p[ 0 ] ) )