summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorPeter Maydell2017-03-03 16:50:33 +0100
committerPeter Maydell2017-03-07 15:33:51 +0100
commit43c227f9dd7945bb4a895f841ecdb957bd8a12da (patch)
tree7d0b763a64df2d45bcf95ca28a7d434de63a2229 /qapi
parentdisas/cris: Avoid unintended sign extension (diff)
downloadqemu-43c227f9dd7945bb4a895f841ecdb957bd8a12da.tar.gz
qemu-43c227f9dd7945bb4a895f841ecdb957bd8a12da.tar.xz
qemu-43c227f9dd7945bb4a895f841ecdb957bd8a12da.zip
disas/arm: Avoid unintended sign extension
When assembling 'given' from the instruction bytes, C's integer promotion rules mean we may promote an unsigned char to a signed integer before shifting it, and then sign extend to a 64-bit long, which can set the high bits of the long. The code doesn't in fact care about the high bits if the long is 64 bits, but this is surprising, so don't do it. (Spotted by Coverity, CID 1005404.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1488556233-31246-7-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions