Files
qemu/include/hw
Anastasia Belova 357b599028 load_elf: fix iterator's type for elf file processing
j is used while loading an ELF file to byteswap segments'
data. If data is larger than 2GB an overflow may happen.
So j should be elf_word.

This commit fixes a minor bug: it's unlikely anybody is trying to
load ELF files with 2GB+ segments for wrong-endianness targets,
but if they did, it wouldn't work correctly.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Cc: qemu-stable@nongnu.org
Fixes: 7ef295ea5b ("loader: Add data swap option to load-elf")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 410c2a4d75)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-01-19 13:41:10 +03:00
..
2023-07-25 17:13:53 +03:00
2023-03-24 11:45:46 +01:00
2023-10-03 02:00:54 +03:00
2023-01-08 01:54:22 -05:00
2023-07-11 00:11:25 +02:00
2023-02-08 07:16:23 +01:00
2023-07-25 17:13:53 +03:00
2023-07-25 17:13:45 +03:00
2023-01-08 01:54:22 -05:00
2023-03-20 12:43:50 +01:00
2022-11-08 11:13:48 +01:00