diff options
author | Aleksandar Markovic <amarkovic@wavecomp.com> | 2019-02-18 08:32:48 +0100 |
---|---|---|
committer | Aleksandar Markovic <amarkovic@wavecomp.com> | 2019-02-21 19:36:47 +0100 |
commit | cd3ed7db22bafbabcb881f51c168a7cf5aecfa51 (patch) | |
tree | 1523dfb79559e0939631a345ad22a6ea374e656d /tests | |
parent | fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9 (diff) |
hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator
Fix 32/64 bit issue in a line involving shift operator. "1 << ..."
calculation of size is done as a 32-bit signed integer which may
then be unintentionally sign-extended into the 64-bit result. The
problem was discovered by Coverity (CID 1398648). Using "1ULL"
instead of "1" on the LHS of the shift fixes this problem.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions