qemu-e2k/include
Anastasia Belova 410c2a4d75 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>
2024-01-18 12:20:33 +00:00
..
authz
block Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
chardev chardev: use bool for fe_is_open 2024-01-12 13:23:48 +00:00
crypto
disas
exec Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
fpu
gdbstub
hw load_elf: fix iterator's type for elf file processing 2024-01-18 12:20:33 +00:00
io Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
libdecnumber
migration Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
monitor
net net: Update MemReentrancyGuard for NIC 2023-11-21 15:42:34 +08:00
qapi string-output-visitor: show structs as "<omitted>" 2023-12-21 22:49:28 +01:00
qemu Revert "osdep: add getloadavg" 2024-01-11 11:39:26 +01:00
qom qom: Add object_property_set_default_list() 2023-11-10 18:19:14 +01:00
scsi
semihosting
standard-headers linux-headers: Synchronize linux headers from linux v6.7.0-rc8 2024-01-11 19:14:00 +08:00
sysemu Record/replay fixes for replay_kernel tests 2024-01-09 10:32:04 +00:00
tcg tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
ui include/ui/rect.h: fix qemu_rect_init() mis-assignment 2023-12-25 11:00:15 +03:00
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h