mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[gateway] include '\0' in paa cookie string
This commit is contained in:
@@ -1052,7 +1052,7 @@ static BOOL rdg_send_tunnel_request(rdpRdg* rdg)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
packetSize += 2 + (UINT32)PAACookieLen * sizeof(WCHAR);
|
||||
packetSize += 2 + (UINT32)(PAACookieLen + 1) * sizeof(WCHAR);
|
||||
fieldsPresent = HTTP_TUNNEL_PACKET_FIELD_PAA_COOKIE;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1073,7 @@ static BOOL rdg_send_tunnel_request(rdpRdg* rdg)
|
||||
|
||||
if (PAACookie)
|
||||
{
|
||||
Stream_Write_UINT16(s, (UINT16)PAACookieLen * 2); /* PAA cookie string length */
|
||||
Stream_Write_UINT16(s, (UINT16)PAACookieLen * sizeof(WCHAR)); /* PAA cookie string length */
|
||||
Stream_Write_UTF16_String(s, PAACookie, (size_t)PAACookieLen);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user