mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
fix ber_bvreplace() in case dst is NULL and src is empty
This commit is contained in:
parent
3d7647fa4a
commit
8b76e15d28
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue