From 8f1c5c4df5f9dedee82bc2eb75f55c2425dd7f43 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 15 Jun 2006 01:47:39 +0000 Subject: [PATCH] improve previous commit --- libraries/liblber/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); } -- 2.39.5