This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chortos
Recipients chortos
Date 2011-07-27.18:29:20
SpamBayes Score 0.00029609379
Marked as misclassified No
Message-id <1311791362.59.0.0211250402323.issue12646@psf.upfronthosting.co.za>
In-reply-to
Content
If a truncated input stream is given to the zlib.decompress function, it raises a zlib.error. However, if the same stream is fed to a zlib.Decompress object, no exception is raised during the entire lifetime of the object. Attached is an example demonstrating the discrepancy.

zlib.decompress raises this exception when it gets a Z_BUF_ERROR from zlib, while the implementation of zlib.Decompress.decompress just skips every Z_BUF_ERROR it gets as described in this (apparently inaccurate) comment:
        /* We will only get Z_BUF_ERROR if the output buffer was full
           but there wasn't more output when we tried again, so it is
           not an error condition.
        */
History
Date User Action Args
2011-07-27 18:29:22chortossetrecipients: + chortos
2011-07-27 18:29:22chortossetmessageid: <1311791362.59.0.0211250402323.issue12646@psf.upfronthosting.co.za>
2011-07-27 18:29:20chortoslinkissue12646 messages
2011-07-27 18:29:20chortoscreate