]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/display/qxl-render.c: fix qxl_unpack_chunks() chunk size calculation
authorMichael Tokarev <mjt@tls.msk.ru>
Fri, 21 Feb 2025 13:34:52 +0000 (16:34 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 29 Jul 2025 17:15:11 +0000 (20:15 +0300)
commit9e9172ffb48e5402f95ce6a4a69faf04ae486448
tree9dd93f1caeb5eb71438c80f977e470826ca69803
parent5a6481389d939c3efd6db63ecf68a5e15782f055
hw/display/qxl-render.c: fix qxl_unpack_chunks() chunk size calculation

In case of multiple chunks, code in qxl_unpack_chunks() takes size of the
wrong (next in the chain) chunk, instead of using current chunk size.
This leads to wrong number of bytes being copied, and to crashes if next
chunk size is larger than the current one.

Based on the code by Gao Yong.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1628
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit b8882becd572d3afb888c836a6ffc7f92c17d1c5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/display/qxl-render.c