Merge pull request #5453 from akallabeth/load_balance_info_checks

Only try to set nego token if load balance info length is >0
This commit is contained in:
Martin Fleisz 2019-07-02 14:12:58 +02:00 committed by GitHub
commit 8b22ea7486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,7 +288,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
nego_set_cookie_max_length(rdp->nego, settings->CookieMaxLength); 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)) if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength))
return FALSE; return FALSE;
@ -492,10 +492,13 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
return FALSE; return FALSE;
if (settings->RedirectionFlags & LB_LOAD_BALANCE_INFO) if (settings->RedirectionFlags & LB_LOAD_BALANCE_INFO)
{
if (settings->LoadBalanceInfo && (settings->LoadBalanceInfoLength > 0))
{ {
if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength)) if (!nego_set_routing_token(rdp->nego, settings->LoadBalanceInfo, settings->LoadBalanceInfoLength))
return FALSE; return FALSE;
} }
}
else else
{ {
BOOL haveRedirectAddress = FALSE; BOOL haveRedirectAddress = FALSE;