From 6c02a1c7d839e581cdf987b2fbeb20148ec7a482 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 12 Nov 2018 10:33:46 +0100 Subject: [PATCH] Fixed version check for remote assistance channel. --- channels/remdesk/client/remdesk_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/channels/remdesk/client/remdesk_main.c b/channels/remdesk/client/remdesk_main.c index 925292931..9bcfc35db 100644 --- a/channels/remdesk/client/remdesk_main.c +++ b/channels/remdesk/client/remdesk_main.c @@ -255,7 +255,13 @@ static UINT remdesk_recv_ctl_version_info_pdu(remdeskPlugin* remdesk, Stream_Read_UINT32(s, versionMajor); /* versionMajor (4 bytes) */ Stream_Read_UINT32(s, versionMinor); /* versionMinor (4 bytes) */ - remdesk->Version = versionMajor; + + if ((versionMajor != 1) || (versionMinor > 2) || (versionMinor == 0)) + { + WLog_ERR(TAG, "Unsupported protocol version %"PRId32".%"PRId32, versionMajor, versionMinor); + } + + remdesk->Version = versionMinor; return CHANNEL_RC_OK; }