mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
null length string is not allowed
This commit is contained in:
parent
e310bd0c86
commit
9dee603fdf
@ -536,8 +536,13 @@ UTF8StringNormalize(
|
||||
/* All space is ASCII. All ASCII is 1 byte */
|
||||
for ( ; p < val->bv_val + val->bv_len && ASCII_SPACE( p[ 0 ] ); p++ );
|
||||
|
||||
ber_mem2bv( p, val->bv_len - (p - val->bv_val), 1, normalized );
|
||||
e = normalized->bv_val + val->bv_len - (p - val->bv_val);
|
||||
normalized->bv_len = val->bv_len - (p - val->bv_val);
|
||||
if ( normalized->bv_len == 0 ) {
|
||||
return LDAP_INVALID_SYNTAX;
|
||||
}
|
||||
|
||||
ber_mem2bv( p, normalized->bv_len, 1, normalized );
|
||||
e = normalized->bv_val + normalized->bv_len;
|
||||
|
||||
assert( normalized->bv_val );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user