projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f96fe6b
)
milkymist-pfpu: fix potential integer overflow
author
Michael Walle
<michael@walle.cc>
Fri, 14 Oct 2016 09:51:50 +0000
(11:51 +0200)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Fri, 28 Oct 2016 15:17:23 +0000
(18:17 +0300)
Since the lm32 is a 32 bit architecture, just return a 32 bit value which
is then converted to a 64 bit value.
Spotted by coverity, CID 1005506.
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/misc/milkymist-pfpu.c
patch
|
blob
|
history
diff --git
a/hw/misc/milkymist-pfpu.c
b/hw/misc/milkymist-pfpu.c
index
1da21a6
..
3ca2589
100644
(file)
--- a/
hw/misc/milkymist-pfpu.c
+++ b/
hw/misc/milkymist-pfpu.c
@@
-137,7
+137,7
@@
struct MilkymistPFPUState {
};
typedef struct MilkymistPFPUState MilkymistPFPUState;
-static inline
hwaddr
+static inline
uint32_t
get_dma_address(uint32_t base, uint32_t x, uint32_t y)
{
return base + 8 * (128 * y + x);