From f34c94e5d54e2af07e1c855a2d7d8f8fb570287d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 10 Jun 1999 00:56:00 +0000 Subject: [PATCH] Disable LDAP_MEMORY_DEBUG on NT (should not have been enabled by default). Fix LDAP_MEMORY_DEBUG realloc size bug, thanks Alex. --- include/portable.h.nt | 2 +- libraries/liblber/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5