libfreerdp-core: fix potential issue while reading packet headers

This commit is contained in:
Marc-André Moreau 2014-03-27 17:09:26 -04:00
parent 3f07157637
commit a8551f4008
1 changed files with 1 additions and 1 deletions

View File

@ -913,7 +913,7 @@ int transport_check_fds(rdpTransport* transport)
{
status = transport_read_nonblocking(transport);
if (status < 0 || Stream_GetPosition(transport->ReceiveBuffer) == 0)
if ((status <= 0) || (Stream_GetPosition(transport->ReceiveBuffer) < 2))
return status;
while ((pos = Stream_GetPosition(transport->ReceiveBuffer)) > 0)