]> git.sur5r.net Git - openldap/commitdiff
Disable LDAP_MEMORY_DEBUG on NT (should not have been enabled by default).
authorKurt Zeilenga <kurt@openldap.org>
Thu, 10 Jun 1999 00:56:00 +0000 (00:56 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 10 Jun 1999 00:56:00 +0000 (00:56 +0000)
Fix LDAP_MEMORY_DEBUG realloc size bug, thanks Alex.

include/portable.h.nt
libraries/liblber/memory.c

index c0044b82d6079d876e8fa2b00578f27b89b868e9..84ddc07a2ab88fa4a29f12c50b45f105e44aee55 100644 (file)
@@ -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
 
index 3b32aa89f35415e07d550ee08fe8ead3bfa1521c..7fedad324f6204507a8e0cbbb69ac195f3c6da55 100644 (file)
@@ -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;