1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-13 22:21:09 +02:00

* memory.c (realloc): Fix compile problem with --enable-m-guard.

This commit is contained in:
David Shaw 2006-04-06 17:58:13 +00:00
parent 1f6fba7c52
commit 4af2725d32
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2006-04-06 David Shaw <dshaw@jabberwocky.com>
* memory.c (realloc): Fix compile problem with --enable-m-guard.
2006-03-30 David Shaw <dshaw@jabberwocky.com> 2006-03-30 David Shaw <dshaw@jabberwocky.com>
* cert.c (main): Fix test program build warning on OSX. * cert.c (main): Fix test program build warning on OSX.

View File

@ -1,5 +1,5 @@
/* memory.c - memory allocation /* memory.c - memory allocation
* Copyright (C) 1998, 1999, 2001, 2005 Free Software Foundation, Inc. * Copyright (C) 1998, 1999, 2001, 2005 Free Software Foundation, Inc.
* *
* This file is part of GnuPG. * This file is part of GnuPG.
* *
@ -509,15 +509,15 @@ FNAMEX(realloc)( void *a, size_t n FNAMEPRT )
if( len >= n ) /* we don't shrink for now */ if( len >= n ) /* we don't shrink for now */
return a; return a;
if( p[-1] == MAGIC_SEC_BYTE ) if( p[-1] == MAGIC_SEC_BYTE )
b = FNAME(alloc_secure_clear)(n FNAMEARG); b = FNAMEXM(alloc_secure_clear)(n FNAMEARG);
else else
b = FNAME(alloc_clear)(n FNAMEARG); b = FNAMEXM(alloc_clear)(n FNAMEARG);
FNAME(check)(NULL FNAMEARG); FNAME(check)(NULL FNAMEARG);
memcpy(b, a, len ); memcpy(b, a, len );
FNAME(free)(p FNAMEARG); FNAMEX(free)(p FNAMEARG);
} }
else else
b = FNAME(alloc)(n FNAMEARG); b = FNAMEXM(alloc)(n FNAMEARG);
#else #else
if( m_is_secure(a) ) { if( m_is_secure(a) ) {
if( !(b = secmexrealloc( a, n )) ) if( !(b = secmexrealloc( a, n )) )