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);
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
{