From: Howard Chu Date: Sun, 15 Nov 2009 03:02:09 +0000 (+0000) Subject: Fix 1.49 sl_realloc X-Git-Tag: ACLCHECK_0~121 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c9d86af0ba10427bb4b3501eece3547bdd5540f1;p=openldap Fix 1.49 sl_realloc --- diff --git a/servers/slapd/sl_malloc.c b/servers/slapd/sl_malloc.c index ad4c1d6e7a..4df800e571 100644 --- a/servers/slapd/sl_malloc.c +++ b/servers/slapd/sl_malloc.c @@ -444,7 +444,7 @@ slap_sl_realloc(void *ptr, ber_len_t size, void *ctx) /* Nowhere to grow, need to alloc and copy */ } else { - newptr = slap_sl_malloc(size-2*sizeof(ber_len_t), ctx); + newptr = slap_sl_malloc(size-sizeof(ber_len_t), ctx); AC_MEMCPY(newptr, ptr, p[-1]-sizeof(ber_len_t)); /* mark old region as free */ p[p[-1]/sizeof(ber_len_t)-1] |= 1;