qemu/contrib/elf2dmp
Peter Maydell f015cbb546 elf2dmp: Fail cleanly if PDB file specifies zero block_size
Coverity points out that if the PDB file we're trying to read
has a header specifying a block_size of zero then we will
end up trying to divide by zero in pdb_ds_read_file().
Check for this and fail cleanly instead.

Fixes: Coverity CID 1458869
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20210910170656.366592-3-philmd@redhat.com
Message-Id: <20210901143910.17112-3-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-09-20 09:54:32 +01:00
..
addrspace.c elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE 2021-01-20 10:46:54 +01:00
addrspace.h elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE 2021-01-20 10:46:54 +01:00
download.c elf2dmp: Check curl_easy_setopt() return value 2021-09-20 09:54:32 +01:00
download.h contrib: add elf2dmp tool 2018-10-02 19:09:12 +02:00
err.h contrib: add elf2dmp tool 2018-10-02 19:09:12 +02:00
kdbg.h contrib/elf2dmp: fix structures definitions 2019-02-05 16:50:17 +01:00
main.c elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE 2021-01-20 10:46:54 +01:00
meson.build curl: convert to meson 2021-01-02 21:03:37 +01:00
pdb.c elf2dmp: Fail cleanly if PDB file specifies zero block_size 2021-09-20 09:54:32 +01:00
pdb.h contrib/elf2dmp: fix structures definitions 2019-02-05 16:50:17 +01:00
pe.h contrib/elf2dmp: fix structures definitions 2019-02-05 16:50:17 +01:00
qemu_elf.c elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init 2020-12-13 23:56:16 +01:00
qemu_elf.h Clean up a few header guard symbols 2019-06-12 13:20:20 +02:00