Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

A possible bug in function inflate_stream (content_encoding.c)? (fwd)

From: Daniel Stenberg <>
Date: Sat, 5 Feb 2005 23:35:32 +0100 (CET)

Forwarding this mail to the (more proper) libcurl list.

      Daniel Stenberg -- --
       Dedicated custom curl help for hire:
---------- Forwarded message ----------
Date: Sat, 5 Feb 2005 11:17:14 +0800
From: Maruko
Subject: A possible bug in function inflate_stream (content_encoding.c)?
When I test libcurl + HTTP protocol today, I found it failed to
download a 64KB file. In function inflate_stream (content_encoding.c),
  the call to inflate() returns Z_BUF_ERROR.
I noticed that 64KB is just the size of the decompress buffer. When
downloading a 64KB file, the decompress buffer is all used, so
z->avail_out will be 0, in this case, the statement below does not
work correctly:
/* Done with these bytes, exit */
if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0)
                                                                ^ ^ ^ ^
^ ^ ^ ^ ^ ^
I think the condition z->avail_out > 0 should be removed.
Any ideas?
Best regards,
Received on 2005-02-05

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET