Skip to contentSkip to conversation

ui/vnc: remove redundant rows computation

PATCH In review [email protected] 3 participants 3 messages Jul 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/vnc: remove redundant rows computation

From: Marc-André Lureau <[email protected]>

"rows" was already computed in an earlier commit 3543c2b855 ("ui/vnc:
fix OOB write in vnc_refresh_lossy_rect").

Fixes e650e4fe0f ("ui/vnc: fix out-of-bounds write in lossy refresh dirty marking")
---
 ui/vnc.c | 1 -
 1 file changed, 1 deletion(-)
ui/vnc.c +0 -1
index 24aa40f7308..656768f9c99 100644
@@ -3016,7 +3016,6 @@ static int vnc_refresh_lossy_rect(VncDisplay *vd, int x, int y,
 
     y = QEMU_ALIGN_DOWN(y, VNC_STAT_RECT);
     x = QEMU_ALIGN_DOWN(x, VNC_STAT_RECT);
-    rows = MIN(VNC_STAT_RECT, height - y);
 
     rows = MIN(VNC_STAT_RECT, height - y);
     if (rows <= 0) {
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Tue, Jul 21, 2026 at 07:28:15PM +0400, [email protected] wrote:

From: Marc-André Lureau <[email protected]>

"rows" was already computed in an earlier commit 3543c2b855 ("ui/vnc:
fix OOB write in vnc_refresh_lossy_rect").

Fixes e650e4fe0f ("ui/vnc: fix out-of-bounds write in lossy refresh dirty marking")
---
 ui/vnc.c | 1 -
 1 file changed, 1 deletion(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 10 lines · On 21/7/26 17:28, [email protected] wrote:

From: Marc-André Lureau <[email protected]>

"rows" was already computed in an earlier commit 3543c2b855 ("ui/vnc:
fix OOB write in vnc_refresh_lossy_rect").

Fixes e650e4fe0f ("ui/vnc: fix out-of-bounds write in lossy refresh dirty marking")
---
  ui/vnc.c | 1 -
  1 file changed, 1 deletion(-)