From 881756a82ce50a26ed6e3b3c403d69cd81c8fea9 Mon Sep 17 00:00:00 2001 From: speidy Date: Wed, 18 May 2016 00:23:07 -0400 Subject: [PATCH] libxrdp: oops, fix virtual desktop size check --- libxrdp/xrdp_sec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index fd8dfa36..9fcc7d13 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1970,8 +1970,8 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s) client_info->height = (y2 - y1) + 1; } /* make sure virtual desktop size is ok */ - if ((client_info->width > 0x7FFE && client_info->width < 0xC8) || - (client_info->height > 0x7FFE && client_info->height < 0xC8)) + if ((client_info->width > 0x7FFE || client_info->width < 0xC8) || + (client_info->height > 0x7FFE || client_info->height < 0xC8)) { LLOGLN(0, ("[ERROR] xrdp_sec_process_mcs_data_monitors: error, virtual desktop width / height is too large")); return 1; /* error */