aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2024-11-11 23:00:40 +0000
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-11-18 13:36:39 +0100
commit7b5574225429621e7122a83c06d1b23931f152df (patch)
treec5b515c14ae8f51257e4197287522c5797cd273f /include
parentc4e1c361b342ccff11df6748198b1e0bcad9b635 (diff)
downloadqemu-7b5574225429621e7122a83c06d1b23931f152df.zip
qemu-7b5574225429621e7122a83c06d1b23931f152df.tar.gz
qemu-7b5574225429621e7122a83c06d1b23931f152df.tar.bz2
hw/display: check frame buffer can hold blob
Coverity reports (CID 1564769, 1564770) that we potentially overflow by doing some 32x32 multiplies for something that ends up in a 64 bit value. Fix this by first using stride for all lines and casting input to uint64_t to ensure a 64 bit multiply is used. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Message-ID: <20241111230040.68470-3-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-gpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 924eb87..8c977be 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -340,7 +340,7 @@ void virtio_gpu_update_cursor_data(VirtIOGPU *g,
* blob_size: size of scanout blob data
*
* This will check we have enough space for the frame taking into
- * account that stride for all but the last line.
+ * account that stride.
*
* Returns true on success, otherwise logs guest error and returns false
*/