mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
fix Compare bug in liblber/memory.c (ITS#3116)
This commit is contained in:
parent
5f2497910b
commit
781c2d02a1
@ -341,7 +341,7 @@ ber_memrealloc_x( void* p, ber_len_t s, void *ctx )
|
|||||||
mh = p;
|
mh = p;
|
||||||
mh->bm_length = s;
|
mh->bm_length = s;
|
||||||
setend( (char *)&mh[1] + mh->bm_length );
|
setend( (char *)&mh[1] + mh->bm_length );
|
||||||
if( (s - oldlen) > 0 ) {
|
if( s > oldlen ) {
|
||||||
/* poison any new memory */
|
/* poison any new memory */
|
||||||
memset( (char *)&mh[1] + oldlen, 0xff, s - oldlen);
|
memset( (char *)&mh[1] + oldlen, 0xff, s - oldlen);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user