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:
276276 xlen = int .from_bytes (data [pos : pos + 2 ], "little" , signed = False )
277277 pos += 2 + xlen
278278 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 :
282282 raise eof_error
283- pos = fname_end
284283 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 :
287286 raise eof_error
288- pos = fcomment_end
289287 if flags & FHCRC :
290288 if len (data ) < pos + 2 :
291289 raise eof_error
You can’t perform that action at this time.
0 commit comments