summary refs log tree commit diff stats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-21 13:33:41 +0000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-02-22 14:28:53 +1100
commitfb6971c110387cf597b58c411658e3d15cc6c6fb (patch)
tree9c732699ce1a6457f1c30cb0aa4f2df8845e32b3 /hw/net/virtio-net.c
parentdf58713396f8b2deb923e39c00b10744c5c63909 (diff)
downloadfocaccia-qemu-fb6971c110387cf597b58c411658e3d15cc6c6fb.tar.gz
focaccia-qemu-fb6971c110387cf597b58c411658e3d15cc6c6fb.zip
hw/ppc/ppc405_uc.c: Avoid integer overflows
When performing clock calculations, the ppc405_uc code
has several places where it multiplies together two
32-bit variables and assigns the result to a 64-bit
variable. This doesn't quite do what is intended because
C will compute a 32-bit multiply result. Add casts to
ensure we don't truncate the result.

(Spotted by Coverity, CID 1005504, 1005505.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions