File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -276,16 +276,14 @@ def _gzip_header_end(data: bytes) -> int:
276
276
xlen = int .from_bytes (data [pos : pos + 2 ], "little" , signed = False )
277
277
pos += 2 + xlen
278
278
if flags & FNAME :
279
- fname_end = data .find (b"\x00 " , pos ) + 1
280
- # fname_end will be -1 + 1 when null byte not found.
281
- if not fname_end :
279
+ pos = data .find (b"\x00 " , pos ) + 1
280
+ # pos will be -1 + 1 when null byte not found.
281
+ if not pos :
282
282
raise eof_error
283
- pos = fname_end
284
283
if flags & FCOMMENT :
285
- fcomment_end = data .find (b"\x00 " , pos ) + 1
286
- if not fcomment_end :
284
+ pos = data .find (b"\x00 " , pos ) + 1
285
+ if not pos :
287
286
raise eof_error
288
- pos = fcomment_end
289
287
if flags & FHCRC :
290
288
if len (data ) < pos + 2 :
291
289
raise eof_error
You can’t perform that action at this time.
0 commit comments