From: Kurt Zeilenga Date: Mon, 26 Apr 2004 23:16:45 +0000 (+0000) Subject: fix Compare bug in liblber/memory.c (ITS#3116) X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~422 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=781c2d02a10fba57cd5e41683ef932c21d47bc9e;p=openldap fix Compare bug in liblber/memory.c (ITS#3116) --- diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index 2f53f470f7..18b5bac876 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -341,7 +341,7 @@ ber_memrealloc_x( void* p, ber_len_t s, void *ctx ) mh = p; mh->bm_length = s; setend( (char *)&mh[1] + mh->bm_length ); - if( (s - oldlen) > 0 ) { + if( s > oldlen ) { /* poison any new memory */ memset( (char *)&mh[1] + oldlen, 0xff, s - oldlen); }