[Zlib-devel] apparent 1.2.7 windowBits == 0 (autodetection) bug
Greg Roelofs
newt at pobox.com
Sun Apr 7 01:46:07 EDT 2013
I wrote:
> Someone just posted an error report to the libpng list about the following
> icons triggering an "invalid distance too far back" error:
> http://ftp.gnome.org/pub/gnome/sources/network-manager-applet/0.9/network-manager-applet-0.9.8.0.tar.xz
> ...but only with libpng 1.6.x. All five files have windowBits == 9, and
> passing that value to inflateInit2(), as pngcheck with zlib support does,
> works fine. But libpng uses the windowBits == 0 auto-detection feature,
> and that breaks.
Sorry, my error: I compiled against a fresh 1.2.7 but didn't statically
link, so I was pulling in the system zlib (1.2.3.3). :-(
With 1.2.7, I see no errors either way with pngcheck, despite John's
contrary experience with libpng 1.6. Given the uncompressed data size,
the errors he's seeing seem reasonable, yet I've printed out every byte
in the uncompressed stream, and they look normal.
So there's still something odd here, but it's no longer clear whether
there's an actual bug in zlib. Apologies for the confusion. :-/
Greg
More information about the Zlib-devel
mailing list