Message406593
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 24, in
read32
return struct.unpack("<I", input.read(4))[0]
error: unpack requires a string argument of length 4
The gzip.read32() function has been removed in Python 3:
commit 7c3922f44c226eac29a497648bbc3cc8702905a8
Author: Serhiy Storchaka <storchaka@gmail.com>
Date: Tue Jan 22 17:01:59 2013 +0200
Issue #1159051: GzipFile now raises EOFError when reading a corrupted file
with truncated header or footer.
Added tests for reading truncated gzip and bzip2 files.
---
File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line
2307, in next
self.fileobj.seek(self.offset)
File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 382, in
seek
self.read(1024)
Moreover, gzip.GzipFile().seek() no longer calls self.read(1024):
commit 2dbc6e6bce0a29757acddd8000d55f7c844295a2
Author: Antoine Pitrou <solipsis@pitrou.net>
Date: Sat Apr 11 00:31:01 2015 +0200
Issue #23529: Limit the size of decompressed data when reading from
GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).
Patch by Martin Panter and Nikolaus Rath.
IMO it's no longer possible to reproduce the gzip.error on gzip.GzipFile.seek(), so I close the issue as out of date. |
|
Date |
User |
Action |
Args |
2021-11-19 16:41:42 | vstinner | set | recipients:
+ vstinner, ezio.melotti, r.david.murray, srid, maker, serhiy.storchaka, mikecmcleod |
2021-11-19 16:41:42 | vstinner | set | messageid: <1637340102.76.0.191508266922.issue6669@roundup.psfhosted.org> |
2021-11-19 16:41:42 | vstinner | link | issue6669 messages |
2021-11-19 16:41:42 | vstinner | create | |
|