[issue25626] Gzip fails for file over 2**32 bytes
Serhiy Storchaka
report at bugs.python.org
Fri Nov 20 04:45:44 EST 2015
Serhiy Storchaka added the comment:
Ah, I found yet one bug.
>>> zlib.decompress(zlib.compress(b'abcd'), 0, sys.maxsize+1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: Negative size passed to PyBytes_FromStringAndSize
There are similar bugs in decompressor's methods decompress() and flush() but it is hard to reproduce them.
The maximal length value should be bounded not only with UINT_MAX, but with PY_SSIZE_T_MAX too.
I would merge sval and uval into one variable of type Py_ssize_t.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25626>
_______________________________________
More information about the Python-bugs-list
mailing list