qemu-e2k/linux-user
Peter Maydell 7dd47667b9 linux-user/elfload.c: Don't memset(NULL..) if malloc() failed
If a malloc() in copy_elf_strings() failed we would call memset()
before the "did malloc fail?" check. Fix this by moving to the
glib alloc/free routines for this memory so we can use g_try_malloc0
rather than having a separate memset(). Spotted by Coverity (see
bug 887883).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-11 12:49:53 -06:00
..
alpha
arm
cris
i386
m68k
microblaze
mips
mips64
mipsn32
ppc
s390x
sh4
sparc sparc-linux-user: Add some missing syscall numbers 2011-10-27 14:43:10 +03:00
sparc64
unicore32
x86_64
cpu-uname.c
cpu-uname.h
elfload.c linux-user/elfload.c: Don't memset(NULL..) if malloc() failed 2011-11-11 12:49:53 -06:00
errno_defs.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c linux-user/elfload.c: Don't memset(NULL..) if malloc() failed 2011-11-11 12:49:53 -06:00
m68k-sim.c
main.c ppc64-linux-user: Fix syscall return type. 2011-10-27 14:43:30 +03:00
mmap.c
qemu-types.h linux-user: fix abi_(u)long, target_ulong mismatch 2011-10-27 14:42:16 +03:00
qemu.h linux-user: Implement new ARM 64 bit cmpxchg kernel helper 2011-09-09 10:46:02 +03:00
signal.c Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging 2011-10-31 15:05:40 -05:00
socket.h
strace.c linux-user: fix abi_(u)long, target_ulong mismatch 2011-10-27 14:42:16 +03:00
strace.list
syscall_defs.h linux-user: fix abi_(u)long, target_ulong mismatch 2011-10-27 14:42:16 +03:00
syscall_types.h
syscall.c configure: fix detection for xattr.h on modern distributions 2011-11-09 12:06:20 -06:00
target_flat.h
uaccess.c
vm86.c linux-user: fix abi_(u)long, target_ulong mismatch 2011-10-27 14:42:16 +03:00