mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Modified per_read_integer to handle a length of 0 (which is seen when older RDP clients connect to the FreeRDP server)
This commit is contained in:
@@ -198,7 +198,9 @@ BOOL per_read_integer(wStream* s, UINT32* integer)
|
||||
if (Stream_GetRemainingLength(s) < length)
|
||||
return FALSE;
|
||||
|
||||
if (length == 1)
|
||||
if (length == 0)
|
||||
*integer = 0;
|
||||
else if (length == 1)
|
||||
Stream_Read_UINT8(s, *integer);
|
||||
else if (length == 2)
|
||||
Stream_Read_UINT16_BE(s, *integer);
|
||||
|
||||
Reference in New Issue
Block a user