diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-02-04 23:05:33 +0000 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2017-02-16 15:29:30 +0100 |
commit | 1e06262da615fcc0ddd658f96c5673a73b856fb6 (patch) | |
tree | fa9b132e6642534c046b7e9bc0e98f3156a184a6 /linux-user/ioctls.h | |
parent | 26920a2961f7cc86bfbdb2184c0ec261d5629c2f (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