aboutsummaryrefslogtreecommitdiff
path: root/linux-user/ioctls.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-04 23:05:33 +0000
committerLaurent Vivier <laurent@vivier.eu>2017-02-16 15:29:30 +0100
commit1e06262da615fcc0ddd658f96c5673a73b856fb6 (patch)
treefa9b132e6642534c046b7e9bc0e98f3156a184a6 /linux-user/ioctls.h
parent26920a2961f7cc86bfbdb2184c0ec261d5629c2f (diff)
linux-user: Use correct types in load_symbols()
Coverity doesn't like the code in load_symbols() which assumes it can use 'int' for a variable that might hold an offset into the guest ELF file, because in a 64-bit guest that could overflow. Guest binaries with 2GB sections aren't very likely and this isn't a security issue because we fully trust the guest linux-user binary anyway, but we might as well use the right types, which will placate Coverity. Use uint64_t to hold section sizes, and bail out if the symbol table is too large rather than just overflowing an int. (Coverity issue CID1005776) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1486249533-5260-1-git-send-email-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/ioctls.h')
0 files changed, 0 insertions, 0 deletions