2e3883d03d
In get_field(), we take an 'unsigned char' value and shift it left, which implicitly promotes it to 'signed int', before ORing it into an 'unsigned long' type. If 'unsigned long' is 64 bits then this will result in a sign extension and the top 32 bits of the result will be 1s. Add explicit casts to unsigned long before shifting to prevent this. (Spotted by Coverity, CID 715697.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-id: 1488556233-31246-4-git-send-email-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
libvixl | ||
alpha.c | ||
arm-a64.cc | ||
arm.c | ||
cris.c | ||
hppa.c | ||
i386.c | ||
ia64.c | ||
lm32.c | ||
m68k.c | ||
Makefile.objs | ||
microblaze.c | ||
mips.c | ||
moxie.c | ||
nios2.c | ||
ppc.c | ||
s390.c | ||
sh4.c | ||
sparc.c | ||
tci.c |