mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
fix ber_bvreplace() in case dst is NULL and src is empty
This commit is contained in:
parent
3d7647fa4a
commit
8b76e15d28
@ -701,7 +701,7 @@ ber_bvreplace_x( struct berval *dst, LDAP_CONST struct berval *src, void *ctx )
|
||||
{
|
||||
assert( dst != NULL );
|
||||
|
||||
if ( dst->bv_len < src->bv_len ) {
|
||||
if ( dst->bv_len == 0 || dst->bv_len < src->bv_len ) {
|
||||
dst->bv_val = ber_memrealloc_x( dst->bv_val, src->bv_len + 1, ctx );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user