[svn] GnuPG - r4107 - trunk/util

svn author dshaw cvs at cvs.gnupg.org
Tue Apr 11 21:45:45 CEST 2006


Author: dshaw
Date: 2006-04-11 21:45:44 +0200 (Tue, 11 Apr 2006)
New Revision: 4107

Modified:
   trunk/util/ChangeLog
   trunk/util/memory.c
Log:
* memory.c (realloc): Revert m_guard fix and stick an #error in there to
inform people not to use it.


Modified: trunk/util/ChangeLog
===================================================================
--- trunk/util/ChangeLog	2006-04-11 19:20:08 UTC (rev 4106)
+++ trunk/util/ChangeLog	2006-04-11 19:45:44 UTC (rev 4107)
@@ -1,3 +1,8 @@
+2006-04-11  David Shaw  <dshaw at jabberwocky.com>
+
+	* 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  <wk at g10code.com>
 
 	* iobuf.c (IOBUF_BUFFER_SIZE): New to repalce hardwired 8192.

Modified: trunk/util/memory.c
===================================================================
--- trunk/util/memory.c	2006-04-11 19:20:08 UTC (rev 4106)
+++ trunk/util/memory.c	2006-04-11 19:45:44 UTC (rev 4107)
@@ -503,21 +503,22 @@
 
 #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 )) )




More information about the Gnupg-commits mailing list