]> git.sur5r.net Git - openldap/commitdiff
disallow unescaped NULs in UTF-8 string values
authorPierangelo Masarati <ando@openldap.org>
Wed, 13 Feb 2002 22:49:03 +0000 (22:49 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 13 Feb 2002 22:49:03 +0000 (22:49 +0000)
libraries/libldap/getdn.c

index 15980e2c2c41e1f5b27830005fb72fdccf02b44a..c162fe724aea72eb966bf51ab4aadeaa9e3b8a5e 100644 (file)
@@ -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 ] ) )