New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zlibmodule.c isn't 64-bit clean #52896
Comments
zlibmodule.c doesn't define PY_SSIZE_T_CLEAN, and uses lots of "int" variables for length values internally. 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 |
See also a related issue: bpo-8651. |
Fixed by r87729. Wait for the buildbots before backporting to other versions. |
Woops, I removed a duplicate message of Antoine. in this issue instead of bpo-8651. Removed message:
This only addresses the compress() and decompress() functions, but e.g. crc32() and adler32() are also touched by this issue. |
crc32() and adler32() were fixed by bpo-10276. PyZlib_objcompress() and PyZlib_objdecompress() should be fixed. |
New changeset 850624632e9a by Nadeem Vawda in branch '3.1': New changeset 99a3ce22c1ff by Nadeem Vawda in branch '3.2': New changeset dea5fcdc9ecd by Nadeem Vawda in branch 'default': |
New changeset 0b5211d19a14 by Nadeem Vawda in branch '3.1': New changeset 3ff862d05d18 by Nadeem Vawda in branch '3.2': New changeset f86a22b6ab58 by Nadeem Vawda in branch 'default': |
Fixed in 3.1, 3.2 and 3.3. 2.7 no longer has this problem -- the fix for bpo-8651 ensures that the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: