[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-02 Thread Peter Weseloh
New submission from Peter Weseloh: 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_ssiz

[issue1372] zlibmodule.c: int overflow in PyZlib_decompress

2007-11-03 Thread Peter Weseloh
Peter Weseloh added the comment: You are right. The format should be 'l'. I overlooked that. In my case the optional 'buf_size' parameter of 'decompress' is not used anyhow. Shall I change the patch accordingly? It work well for me and I now checked the co