3820c3aa3f
This commit replaces calloc calls, which called calloc() as if it were malloc() by allocating a multiple of objects as a sizeof multiplied by the number of objects. The patch rectifies this by calling calloc() as it was meant to be called. This commit also replaces realloc() with reallocarray() in a similar fashion as above. Instead of calculating the memory to reallocated (changed) by multiplying sizeof by the number of objects, the sizeof and number are passed as separate arguments to reallocarray(), letting reallocarray() do the multiplication instead. Like the calloc() adjustment above, this is approach is cleaner and more elegant than than the previous code. This has been tested on my production firewall and a laptop (also running ipfilter). Submitted by: pfg MFC after: 6 weeks |
||
---|---|---|
.. | ||
BNF.ipf | ||
BNF.ipnat | ||
ipf_y.y | ||
ipf.c | ||
ipfcomp.c | ||
ipfs.c | ||
ipfstat.c | ||
ipfsyncd.c | ||
ipftest.c | ||
ipmon_y.y | ||
ipmon.c | ||
ipnat_y.y | ||
ipnat.c | ||
ippool_y.y | ||
ippool.c | ||
ipscan_y.y | ||
ipsyncm.c | ||
ipsyncs.c | ||
lex_var.h | ||
lexer.c | ||
lexer.h | ||
Makefile |