diff options
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r-- | Lib/gzip.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py index 8fb1ed06c9..0adfd3fdf8 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -280,7 +280,8 @@ class GzipFile(io.BufferedIOBase): if flag & FEXTRA: # Read & discard the extra field, if present - self._read_exact(struct.unpack("<H", self._read_exact(2))) + extra_len, = struct.unpack("<H", self._read_exact(2)) + self._read_exact(extra_len) if flag & FNAME: # Read and discard a null-terminated string containing the filename while True: |