From 8df71cf86831f141af9c1ac7dacdeaac7687d52d Mon Sep 17 00:00:00 2001 From: David Shaw Date: Tue, 11 Apr 2006 19:45:44 +0000 Subject: [PATCH] * memory.c (realloc): Revert m_guard fix and stick an #error in there to inform people not to use it. --- util/ChangeLog | 5 +++++ util/memory.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/util/ChangeLog b/util/ChangeLog index b3e1766f3..366f4c1be 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2006-04-11 David Shaw + + * memory.c (realloc): Revert m_guard fix and stick an #error in + there to inform people not to use it. + 2006-04-11 Werner Koch * iobuf.c (IOBUF_BUFFER_SIZE): New to repalce hardwired 8192. diff --git a/util/memory.c b/util/memory.c index cfdb0911f..e16c3d8f7 100644 --- a/util/memory.c +++ b/util/memory.c @@ -503,21 +503,22 @@ FNAMEX(realloc)( void *a, size_t n FNAMEPRT ) #ifdef M_GUARD if( a ) { +#error "--enable-m-guard does not currently work" unsigned char *p = a; size_t len = m_size(a); if( len >= n ) /* we don't shrink for now */ return a; if( p[-1] == MAGIC_SEC_BYTE ) - b = FNAMEXM(alloc_secure_clear)(n FNAMEARG); + b = FNAME(alloc_secure_clear)(n FNAMEARG); else - b = FNAMEXM(alloc_clear)(n FNAMEARG); + b = FNAME(alloc_clear)(n FNAMEARG); FNAME(check)(NULL FNAMEARG); memcpy(b, a, len ); - FNAMEX(free)(p FNAMEARG); + FNAME(free)(p FNAMEARG); } else - b = FNAMEXM(alloc)(n FNAMEARG); + b = FNAME(alloc)(n FNAMEARG); #else if( m_is_secure(a) ) { if( !(b = secmexrealloc( a, n )) )