mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-21 09:19:31 +08:00
5bb35772b3
malloc(0) can legitimately return NULL; it does on some systems and not others. Force the size to 1 byte if the size is 0 coming in, except for realloc() where this is legitimate and equivalent to free(). Since this is an abnormal case, and can't even happen with most C libraries, handle it on the error path, after we already got back a NULL pointer. Reported-by: Ozkan Sezer <sezeroz@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> |
||
---|---|---|
.. | ||
bytesex.h | ||
compiler.h | ||
disp8.h | ||
error.h | ||
hashtbl.h | ||
iflag.h | ||
ilog2.h | ||
insns.h | ||
labels.h | ||
md5.h | ||
nasm.h | ||
nasmint.h | ||
nasmlib.h | ||
nctype.h | ||
opflags.h | ||
perfhash.h | ||
raa.h | ||
rbtree.h | ||
rdoff.h | ||
saa.h | ||
strlist.h | ||
tables.h | ||
ver.h |