contrib/elf2dmp: Ensure segment fits in file
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 7 Mar 2024 10:20:55 +0000 (19:20 +0900)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 11 Mar 2024 17:06:06 +0000 (17:06 +0000)
commit667909478b09f9f16b03b7e7b11f3c42e7bdcdf3
tree0b46d12693b10f3f085f42bf2992a037db99a44d
parent2aa205f7c6339cb46d26473a0434a292fc3d32cf
contrib/elf2dmp: Ensure segment fits in file

This makes elf2dmp more robust against corrupted inputs.

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-12-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
contrib/elf2dmp/addrspace.c