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;