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 PeterW
Recipients PeterW
Date 2007-11-02.10:39:30
SpamBayes Score 0.03339873
Marked as misclassified No
Message-id <1193999971.29.0.358180724062.issue1372@psf.upfronthosting.co.za>
In-reply-to
Content
When I use zlib.decompress to decompress a string where the result would
be >1 GB I get
SystemError: Objects/stringobject.c:4089: bad argument to internal function

I tracked that down to an int overflow of r_strlen in PyZlib_decompress.
Using Py_ssize_t instead of int solved this for me (on 64bit Linux).

The patch is against
python/trunk/Modules/zlibmodule.c
Revision: 56476

Kind regards,
Peter
Files
File name Uploaded
int_overflow.diff PeterW, 2007-11-02.10:39:30
History
Date User Action Args
2007-11-02 10:39:31PeterWsetspambayes_score: 0.0333987 -> 0.03339873
recipients: + PeterW
2007-11-02 10:39:31PeterWsetspambayes_score: 0.0333987 -> 0.0333987
messageid: <1193999971.29.0.358180724062.issue1372@psf.upfronthosting.co.za>
2007-11-02 10:39:31PeterWlinkissue1372 messages
2007-11-02 10:39:30PeterWcreate