New submission from Antoine Pitrou <pit...@free.fr>: 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 ---------- components: Extension Modules messages: 105216 nosy: gregory.p.smith, pitrou priority: normal severity: normal stage: needs patch status: open title: zlibmodule.c isn't 64-bit clean type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8650> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com