diff options
author | Peter Maydell | 2020-03-24 18:36:30 +0100 |
---|---|---|
committer | Peter Maydell | 2020-04-03 20:26:41 +0200 |
commit | 174d2d6856bf435f4f58e9303ba30dd0e1279d3f (patch) | |
tree | e1e70274e565f0029141d885c33cc910e0248d83 /hw/dma | |
parent | hw/gpio/aspeed_gpio.c: Don't directly include assert.h (diff) | |
download | qemu-174d2d6856bf435f4f58e9303ba30dd0e1279d3f.tar.gz qemu-174d2d6856bf435f4f58e9303ba30dd0e1279d3f.tar.xz qemu-174d2d6856bf435f4f58e9303ba30dd0e1279d3f.zip |
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
Diffstat (limited to 'hw/dma')
0 files changed, 0 insertions, 0 deletions