contrib/elf2dmp: Clamp QEMU note to file size
commit9de37c288367ad22dd8abe069eeae17faf6e3ed9
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 7 Mar 2024 10:21:01 +0000 (7 19:21 +0900)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 11 Mar 2024 17:06:27 +0000 (11 17:06 +0000)
tree134f18f96ac7af253cac8972de638aab69365808
parent0c94e32dff020f868a8125c5314fe9f318a8215d
contrib/elf2dmp: Clamp QEMU note to file size

This fixes crashes with truncated dumps.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-18-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
contrib/elf2dmp/qemu_elf.c