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 pitrou
Recipients gregory.p.smith, pitrou
Date 2010-05-07.17:20:58
SpamBayes Score 0.07062059
Marked as misclassified No
Message-id <1273252861.66.0.962857738541.issue8650@psf.upfronthosting.co.za>
In-reply-to
Content
zlibmodule.c doesn't define PY_SSIZE_T_CLEAN, and uses lots of "int" variables for length values internally.
Besides, the zlib itself uses "uInt" and "uLong" variables in its z_stream structure (rather than something guaranteed to be at least the width of a pointer).

On large input data, this will conspire to produce bogus results or crashes. For example:

>>> s = 'x' * (4 * 1024**3 + 100)
>>> t = zlib.compress(s, 1)
>>> len(t)
12
>>> len(zlib.decompress(t))
100
History
Date User Action Args
2010-05-07 17:21:02pitrousetrecipients: + pitrou, gregory.p.smith
2010-05-07 17:21:01pitrousetmessageid: <1273252861.66.0.962857738541.issue8650@psf.upfronthosting.co.za>
2010-05-07 17:20:59pitroulinkissue8650 messages
2010-05-07 17:20:58pitroucreate