]> git.sur5r.net Git - openldap/commitdiff
fix Compare bug in liblber/memory.c (ITS#3116)
authorKurt Zeilenga <kurt@openldap.org>
Mon, 26 Apr 2004 23:16:45 +0000 (23:16 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 26 Apr 2004 23:16:45 +0000 (23:16 +0000)
libraries/liblber/memory.c

index 2f53f470f7a7cbcb2bee66d055b79d3ac172d651..18b5bac87621dda49941a61dd3050361d63e3639 100644 (file)
@@ -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);
                }