mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-11 21:48:50 +01:00
88ac956836
* g10/getkey.c (get_user_id): Do not call xmalloc with 0.
* common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
pass 0 to the arguments.
--
The problem did not occur in 1.x because over there the xmalloc makes
sure to allocate at least one byte. With 2.x for most calls the
xmalloc of Libgcrypt is used and Libgcrypt returns an error insteead
of silent allocating a byte. Thus gpg 2.x bailed out with an
"Fatal: out of core while allocating 0 bytes".
The extra code in xmalloc.c is for more robustness for the other
xmalloc calls.
(cherry picked from commit
|
||
---|---|---|
.. | ||
argparse.c | ||
argparse.h | ||
ChangeLog-2011 | ||
dotlock.c | ||
dotlock.h | ||
dynload.h | ||
libjnlib-config.h | ||
logging.c | ||
logging.h | ||
Makefile.am | ||
mischelp.c | ||
mischelp.h | ||
README | ||
stringhelp.c | ||
stringhelp.h | ||
strlist.c | ||
strlist.h | ||
t-stringhelp.c | ||
t-support.c | ||
t-support.h | ||
types.h | ||
utf8conv.c | ||
utf8conv.h | ||
w32-afunix.c | ||
w32-afunix.h | ||
w32-gettext.c | ||
w32-reg.c | ||
w32help.h | ||
xmalloc.c | ||
xmalloc.h |
JNLIB - This is a collection of utility function which are too small to put into a library. The code here is licensed under the LGPL. libjnlib-config.h should be be modified for each project to make these functions fit into the software. Mainly these are memory functions in case you need another allocator.