mirror of https://github.com/FreeRDP/FreeRDP
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:
parent
2ec493d094
commit
50cf0ee915
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue