From 32e48d9e4d4b31e0763576bda066ab908a91d797 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 13 Feb 2002 22:49:03 +0000 Subject: [PATCH] disallow unescaped NULs in UTF-8 string values --- libraries/libldap/getdn.c | 3 +++ 1 file changed, 3 insertions(+) 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 ] ) ) -- 2.39.5