mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Don't use strdup on bervals
This commit is contained in:
parent
6d01c81596
commit
97b0c98ab5
@ -2117,7 +2117,11 @@ IA5StringNormalize(
|
||||
/* Ignore initial whitespace */
|
||||
while ( ASCII_SPACE( *p ) ) p++;
|
||||
|
||||
normalized->bv_val = ber_strdup_x( p, ctx );
|
||||
normalized->bv_len = val->bv_len - ( p - val->bv_val );
|
||||
normalized->bv_val = slap_sl_malloc( normalized->bv_len + 1, ctx );
|
||||
AC_MEMCPY( normalized->bv_val, p, normalized->bv_len );
|
||||
normalized->bv_val[normalized->bv_len] = '\0';
|
||||
|
||||
p = q = normalized->bv_val;
|
||||
|
||||
while ( *p ) {
|
||||
|
Loading…
Reference in New Issue
Block a user