From 10dc90cca76b0bdb409e9007bf5925d6f74791da Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 26 Feb 2026 13:37:24 +0100 Subject: [PATCH] [core,update] reset update->us immediately --- libfreerdp/core/update.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index dfc0bf71c..b0e312a3b 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -1055,6 +1055,8 @@ static BOOL s_update_end_paint(rdpContext* context) return FALSE; wStream* s = update->us; + update->us = NULL; + Stream_SealLength(s); Stream_SetPosition(s, update->offsetOrders); Stream_Write_UINT16(s, update->numberOrders); /* numberOrders (2 bytes) */ @@ -1070,7 +1072,7 @@ static BOOL s_update_end_paint(rdpContext* context) update->combineUpdates = FALSE; update->numberOrders = 0; update->offsetOrders = 0; - update->us = NULL; + rc = TRUE; fail: Stream_Free(s, TRUE);