Merge pull request #4952 from eledoux/master

gateway HTTP transport - fixed partial reads
This commit is contained in:
akallabeth 2018-10-19 17:13:21 +02:00 committed by GitHub
commit c251bdc11a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,10 +79,11 @@ static BOOL rdg_read_all(rdpTls* tls, BYTE* buffer, int size)
{
int status;
int readCount = 0;
BYTE* pBuffer = buffer;
while (readCount < size)
{
status = BIO_read(tls->bio, buffer, size - readCount);
status = BIO_read(tls->bio, pBuffer, size - readCount);
if (status <= 0)
{
@ -93,6 +94,7 @@ static BOOL rdg_read_all(rdpTls* tls, BYTE* buffer, int size)
}
readCount += status;
pBuffer += status;
}
return TRUE;