From 17d195b7a6d68767b963c09c53f5c04e9f39c5a6 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sat, 6 Jul 2024 12:46:49 +0200 Subject: [PATCH] [core,capabilities] fix CapsProtocolVersion if the wrong version 0x0000 is sent (older FreeRDP based servers) correct the value to TS_CAPS_PROTOCOLVERSION (0x0200) along with a warning message. --- libfreerdp/core/capabilities.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index f4274d7e0..586086d4f 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -221,8 +221,9 @@ static BOOL rdp_read_general_capability_set(wStream* s, rdpSettings* settings) { WLog_WARN(TAG, "TS_GENERAL_CAPABILITYSET::protocolVersion(0x%04" PRIx16 - " assuming old FreeRDP, ignoring protocol violation.", + " assuming old FreeRDP, ignoring protocol violation, correcting value.", settings->CapsProtocolVersion); + settings->CapsProtocolVersion = TS_CAPS_PROTOCOLVERSION; } else return FALSE;