coreboot-kgpe-d16/payloads/libpayload/libc
Jonathan Neuschäfer a4fbc385e0 libpayload/libc: Fix memset/sizeof usage
Since r is a pointer, memset(r, 0, sizeof(r)) would only zero the first
4 (or 8) bytes of the newly allocated struct align_region_t.

An alternative to this patch would be to use calloc, or introduce a new
zalloc (zeroed allocation; a single-element calloc) and use that.

Change-Id: Ic3e3487ce749eeebf6c4836e62b8a305ad766e7e
Found-by: Coverity (ID 1291160)
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14244
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-04-06 13:33:07 +02:00
..
64bit_div.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
Makefile.inc libpayload: Add support for handling fmaps 2015-07-14 18:12:06 +02:00
args.c
console.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
coreboot.c libpayload: Drop CONFIG_LP_CHROMEOS 2016-03-15 18:22:58 +01:00
ctype.c Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
die.c
exec.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
fmap.c libpayload: Add support for handling fmaps 2015-07-14 18:12:06 +02:00
getopt_long.c
hexdump.c
ipchecksum.c
lib.c Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
libgcc.c
malloc.c libpayload/libc: Fix memset/sizeof usage 2016-04-06 13:33:07 +02:00
memory.c libpayload: Fix default_memmove() implementation 2015-08-19 16:35:08 +00:00
printf.c
qsort.c
rand.c
readline.c
string.c
strlcpy.c
sysinfo.c
time.c libpayload: Fix compile error in time.c if nvram support is disabled 2015-08-10 18:10:00 +02:00