libfreerdp-core: fixed transport

Commit 1daea0d0dc introduced an
error: If transport_read_nonblocking returns 0 we may not return
without checking if the ReceiveBuffer is empty.
This commit is contained in:
Norbert Federa 2014-03-19 21:06:21 +01:00
parent 03db4c912e
commit 52f06250fd

View File

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