1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00
* memory.c (alloc): Malloc at least 1 byte.  Noted by Winona Brown.
g10/
* options.skel: Removed the comment on trusted-keys because this
option is now deprecated.
This commit is contained in:
Werner Koch 2002-05-02 07:48:39 +00:00
parent 66c8a663a5
commit 1b65d681ff
8 changed files with 960 additions and 994 deletions

View file

@ -1,3 +1,7 @@
2002-05-02 Werner Koch <wk@gnupg.org>
* memory.c (alloc): Malloc at least 1 byte. Noted by Winona Brown.
2002-04-23 David Shaw <dshaw@jabberwocky.com>
* miscutil.c: New function answer_is_yes_no_default() to give a

View file

@ -415,6 +415,8 @@ FNAME(alloc)( size_t n FNAMEPRT )
char *p;
#ifdef M_GUARD
if(!n)
out_of_core(n,0); /* should never happen */
if( !(p = malloc( n + EXTRA_ALIGN+5 )) )
out_of_core(n,0);
store_len(p,n,0);
@ -422,6 +424,10 @@ FNAME(alloc)( size_t n FNAMEPRT )
p[4+EXTRA_ALIGN+n] = MAGIC_END_BYTE;
return p+EXTRA_ALIGN+4;
#else
/* mallocing zero bytes is undefined by ISO-C, so we better make
sure that it won't happen */
if (!n)
n = 1;
if( !(p = malloc( n )) )
out_of_core(n,0);
return p;