From: Pierangelo Masarati Date: Thu, 15 Jun 2006 01:47:39 +0000 (+0000) Subject: improve previous commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~101 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8f1c5c4df5f9dedee82bc2eb75f55c2425dd7f43;p=openldap improve previous commit --- diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index 614305c9ed..ddd78622f2 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -700,8 +700,9 @@ struct berval * ber_bvreplace_x( struct berval *dst, LDAP_CONST struct berval *src, void *ctx ) { assert( dst != NULL ); + assert( !BER_BVISNULL( src ) ); - if ( dst->bv_len == 0 || dst->bv_len < src->bv_len ) { + if ( BER_BVISNULL( dst ) || dst->bv_len < src->bv_len ) { dst->bv_val = ber_memrealloc_x( dst->bv_val, src->bv_len + 1, ctx ); }