Gregory P. Smith added the comment:
This bug prevents zipfile's writestr() from writing large data (longer than
UINT_MAX) to a 64-bit zip file.
The zlib.crc32 function which, as written, cannot accept input with a size
larger than an unsigned int.
Danny Yoo added the comment:
Unfortunately, fixing just zlib.crc32 isn't quite enough for our purposes. We
still will see OverflowErrow in zipfile if compression is selected.
Demonstration code:
import zipfile
## Possible workaround:
New submission from Danny Yoo:
Reproduction steps:
---
$ python2.7 -c import zlib;zlib.crc32('a'*(131))
Traceback (most recent call last):
File string, line 1, in module
OverflowError: size does not fit in an int
---
We ran into this bug in zlib.crc32 when using zipfile.writestr() with a