From: Kurt Zeilenga Date: Thu, 10 Jun 1999 00:56:00 +0000 (+0000) Subject: Disable LDAP_MEMORY_DEBUG on NT (should not have been enabled by default). X-Git-Tag: OPENLDAP_REL_ENG_2_BP~354 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f34c94e5d54e2af07e1c855a2d7d8f8fb570287d;p=openldap Disable LDAP_MEMORY_DEBUG on NT (should not have been enabled by default). Fix LDAP_MEMORY_DEBUG realloc size bug, thanks Alex. --- diff --git a/include/portable.h.nt b/include/portable.h.nt index c0044b82d6..84ddc07a2a 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -24,7 +24,7 @@ #define DIRSEP "\\" #if defined( _DEBUG ) && !defined( LDAP_DEBUG ) -#define LDAP_MEMORY_DEBUG 1 +/* #define LDAP_MEMORY_DEBUG 1 */ #define LDAP_DEBUG 1 #endif diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index 3b32aa89f3..7fedad324f 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -194,7 +194,7 @@ ber_memrealloc( void* p, size_t s ) ((char *)p - sizeof(struct ber_mem_hdr)); assert( mh->bm_junk == BER_MEM_JUNK ); - p = realloc( mh, s ); + p = realloc( mh, s + sizeof(struct ber_mem_hdr) ); if( p == NULL ) return NULL;