From 3430b8898c8f95b31af72a58a8eeafeae65640d5 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:30:53 +0000 Subject: [PATCH] GFX: Fix disconnect on resize of busy windows When a resize is underway on a busy X server, it is possible for a queued EGFX cmd (order #62) to be processed after the decoder has been deleted. This causes a client disconnect with no useful error message. --- xrdp/xrdp_mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index c136894a..e15cfd0b 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -4150,11 +4150,13 @@ server_egfx_cmd(struct xrdp_mod *mod, mm = wm->mm; if (mm->encoder == NULL) { + // This can happen when we are in the resize state machine, if + // there are messages queued up by the X server if (data != NULL) { g_munmap(data, data_bytes); } - return 1; + return 0; } enc = g_new0(struct xrdp_enc_data, 1); if (enc == NULL)