From: Jacek Caban Subject: wininet: Don't use returned read size if read failed in gzip_read. Message-Id: Date: Fri, 7 Apr 2017 17:31:02 +0200 Signed-off-by: Jacek Caban --- dlls/wininet/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index fd58b1f..321d569 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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, ¤t_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;