nasm/include
H. Peter Anvin (Intel) 5bb35772b3 BR 3392597: the system malloc() can return NULL
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>
2019-08-16 00:41:29 -07:00
..
bytesex.h bytesex.h: more simplifications and add const 2017-11-29 17:19:27 -08:00
compiler.h config.h: separate function and function pointer attributes; automate 2019-08-16 00:08:27 -07:00
disp8.h
error.h error.h: fix typo: nasm_intof -> nasm_infof 2019-08-09 12:27:29 -07:00
hashtbl.h Remove #includes already provided by "compiler.h" 2018-12-27 12:45:44 -08:00
iflag.h LEA: allow immediate syntax; ignore operand size entirely 2019-08-14 15:23:00 -07:00
ilog2.h Remove #includes already provided by "compiler.h" 2018-12-27 12:45:44 -08:00
insns.h Merge tag 'nasm-2.13.03' 2018-02-07 13:51:54 -08:00
labels.h Cleanup of label renaming infrastructure, add subsection support 2018-06-01 18:06:25 -07:00
md5.h
nasm.h preproc: fix mmacro nesting prevention 2019-08-15 19:26:52 -07:00
nasmint.h
nasmlib.h BR 3392597: the system malloc() can return NULL 2019-08-16 00:41:29 -07:00
nctype.h Restore the ability to have ? in identifiers, except ? itself 2018-12-14 00:57:05 -08:00
opflags.h opflags: Convert is_class and is_reg_class to helpers 2018-10-13 22:57:30 +03:00
perfhash.h Add generic perfect string hashes, use for directives 2017-04-03 00:27:07 -07:00
raa.h RAA: make pointer vs integer RAAs type safe 2018-06-18 17:11:54 -07:00
rbtree.h
rdoff.h rdoff: use nasm-provided safe memory allocation and I/O 2017-04-17 13:56:50 -07:00
saa.h saa, raa: saa_init() and raa_init() will never return NULL 2017-04-23 23:37:11 -07:00
strlist.h listing: add -L option for additional listing info 2019-08-09 08:39:02 -07:00
tables.h macros: can't use the __USE_*__ macro string anymore; fix comment stripping 2019-08-15 11:53:19 -07:00
ver.h nasmlib/ver.[ch]: add "compiler.h" 2018-12-26 06:37:25 -08:00