From 19103fee3d9bd489f9cb641d2ae849dd00365459 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 2 Jul 2019 11:53:14 +0200 Subject: [PATCH] Only try to set nego token if load balance info length is >0 --- libfreerdp/core/connection.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 2500c4d28..d6822f71f 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -288,7 +288,7 @@ BOOL rdp_client_connect(rdpRdp* rdp) nego_set_cookie_max_length(rdp->nego, settings->CookieMaxLength); - if (settings->LoadBalanceInfo) + if (settings->LoadBalanceInfo && (settings->LoadBalanceInfoLength > 0)) { if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength)) return FALSE; @@ -493,8 +493,11 @@ BOOL rdp_client_redirect(rdpRdp* rdp) if (settings->RedirectionFlags & LB_LOAD_BALANCE_INFO) { - if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength)) - return FALSE; + if (settings->LoadBalanceInfo && (settings->LoadBalanceInfoLength > 0)) + { + if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength)) + return FALSE; + } } else {