[issue21560] gzip.write changes trailer ISIZE field before type checking - corrupted gz file after trying to write string

Claudiu.Popa report at bugs.python.org
Fri May 23 14:02:17 CEST 2014


Claudiu.Popa added the comment:

Moving `self.crc = zlib.crc32(data, self.crc) & 0xffffffff` before `self.size = self.size + len(data)` should be enough. Also, your patch needs a test.

----------
nosy: +Claudiu.Popa

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21560>
_______________________________________


More information about the Python-bugs-list mailing list