From fb87f6d0bd9e6c9785f82fdfd20d707f9a978bdc Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 16 Oct 2018 12:46:44 +0200 Subject: [PATCH] Added a warning that the server sent an unsupported order --- libfreerdp/core/orders.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index c55a13e..9b2ebcb 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -3281,6 +3281,7 @@ static BOOL update_recv_primary_order(rdpUpdate* update, wStream* s, BYTE flags) rdpContext* context = update->context; rdpPrimaryUpdate* primary = update->primary; ORDER_INFO* orderInfo = &(primary->order_info); + rdpSettings* settings = context->settings; const char* orderName; if (flags & ORDER_TYPE_CHANGE) @@ -3656,6 +3657,13 @@ static BOOL update_recv_primary_order(rdpUpdate* update, wStream* s, BYTE flags) WLog_Print(update->log, WLOG_DEBUG, "Primary Drawing Order %s", orderName); + if (settings->GlyphSupportLevel == GLYPH_SUPPORT_NONE) + { + WLog_Print(update->log, WLOG_ERROR, + "%s - SERVER BUG: The support for this feature was not announced!", orderName); + return TRUE; + } + if (!freerdp_primary_adjust_bound(update->log, orderName, context, &primary->glyph_index.bkLeft, &primary->glyph_index.bkTop, &primary->glyph_index.bkRight, &primary->fast_index.bkBottom)) @@ -3682,6 +3690,13 @@ static BOOL update_recv_primary_order(rdpUpdate* update, wStream* s, BYTE flags) WLog_Print(update->log, WLOG_DEBUG, "Primary Drawing Order %s", orderName); + if (settings->GlyphSupportLevel == GLYPH_SUPPORT_NONE) + { + WLog_Print(update->log, WLOG_ERROR, + "%s - SERVER BUG: The support for this feature was not announced!", orderName); + return TRUE; + } + if (!freerdp_primary_adjust_bound(update->log, orderName, context, &primary->fast_index.bkLeft, &primary->fast_index.bkTop, @@ -3709,6 +3724,13 @@ static BOOL update_recv_primary_order(rdpUpdate* update, wStream* s, BYTE flags) WLog_Print(update->log, WLOG_DEBUG, "Primary Drawing Order %s", orderName); + if (settings->GlyphSupportLevel == GLYPH_SUPPORT_NONE) + { + WLog_Print(update->log, WLOG_ERROR, + "%s - SERVER BUG: The support for this feature was not announced!", orderName); + return TRUE; + } + if (!freerdp_primary_adjust_bound(update->log, orderName, context, &primary->fast_glyph.bkLeft, &primary->fast_glyph.bkTop, &primary->fast_glyph.bkRight, &primary->fast_index.bkBottom)) -- 2.7.4