diff --git a/CHANGES.md b/CHANGES.md index a6917b1f1..2cb75d1a5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ v3.0.4 - YYYY-MM-DD - Updated `ippeveprinter` to add a date/time stamp when logging to a file. - Now explicitly validate IPP attribute names as keyword strings. - Fixed `httpGetDateString` with bad date/time values (Issue #167) +- Fixed the number of bytes reported by `httpPeek` for content-encoded data. - Fixed a potential buffer overflow in `cupsDNSSDAssembleFullName` on Windows (Issue #170) - Fixed a potential string overrun when loading .strings files (Issue #171) diff --git a/cups/http.c b/cups/http.c index 079dafd3a..7b774515a 100644 --- a/cups/http.c +++ b/cups/http.c @@ -1687,7 +1687,7 @@ httpPeek(http_t *http, // I - HTTP connection return (-1); } - bytes = (ssize_t)(length - ((z_stream *)http->stream)->avail_out); + bytes = (ssize_t)(length - stream.avail_out); } else if (http->used > 0) {