aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2006-04-11 19:45:44 +0000
committerDavid Shaw <[email protected]>2006-04-11 19:45:44 +0000
commit8df71cf86831f141af9c1ac7dacdeaac7687d52d (patch)
tree4c5c04f923f30863d69d3aae97d3c977bf4e66e1
parent* options.skel, photoid.c (get_default_photo_command): Find an image (diff)
downloadgnupg-8df71cf86831f141af9c1ac7dacdeaac7687d52d.tar.gz
gnupg-8df71cf86831f141af9c1ac7dacdeaac7687d52d.zip
* memory.c (realloc): Revert m_guard fix and stick an #error in there to
inform people not to use it.
-rw-r--r--util/ChangeLog5
-rw-r--r--util/memory.c9
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 <[email protected]>
+
+ * 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 <[email protected]>
* 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 )) )