qemu-e2k/dump
Peter Maydell 174d2d6856 dump: Fix writing of ELF section
In write_elf_section() we set the 'shdr' pointer to point to local
structures shdr32 or shdr64, which we fill in to be written out to
the ELF dump.  Unfortunately the address we pass to fd_write_vmcore()
has a spurious '&' operator, so instead of writing out the section
header we write out the literal pointer value followed by whatever is
on the stack after the 'shdr' local variable.

Pass the correct address into fd_write_vmcore().

Spotted by Coverity: CID 1421970.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200324173630.12221-1-peter.maydell@linaro.org
2020-04-03 19:26:41 +01:00
..
Makefile.objs dump: Move HMP command handlers to dump/ 2019-07-02 13:37:00 +02:00
dump-hmp-cmds.c hmp: drop Error pointer indirection in hmp_handle_error 2019-12-18 08:36:16 +01:00
dump.c dump: Fix writing of ELF section 2020-04-03 19:26:41 +01:00
win_dump.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
win_dump.h dump: Move the code to dump/ 2019-07-02 13:37:00 +02:00