From d2bab53364e179203af0fd6bbbac936269760661 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Mon, 17 Jun 2024 11:53:47 +0100 Subject: [PATCH] Don't use GFX if server max_bpp is <32 --- libxrdp/xrdp_sec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 71c9b9ee..7c6282a5 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -2146,6 +2146,12 @@ xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec *self, struct stream *s) LOG(LOG_LEVEL_WARNING, "client requested gfx protocol with insufficient color depth"); } + else if (client_info->max_bpp > 0 && client_info->max_bpp < 32) + { + LOG(LOG_LEVEL_WARNING, "Client requested gfx protocol " + "but the server configuration is limited to %d bpp.", + client_info->max_bpp); + } else { LOG(LOG_LEVEL_INFO, "client supports gfx protocol");