Commit 7d8cf318 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Don't use returned read size if read failed in gzip_read.

parent 250f7197
......@@ -466,10 +466,10 @@ static DWORD gzip_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DW
}
res = gzip_stream->parent_stream->vtbl->read(gzip_stream->parent_stream, req, gzip_stream->buf+gzip_stream->buf_size,
sizeof(gzip_stream->buf)-gzip_stream->buf_size, &current_read, allow_blocking);
gzip_stream->buf_size += current_read;
if(res != ERROR_SUCCESS)
break;
gzip_stream->buf_size += current_read;
if(!current_read) {
WARN("unexpected end of data\n");
gzip_stream->end_of_data = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment