From a7e0ee693851f0cabb20f2b39d295b01de6496d9 Mon Sep 17 00:00:00 2001 From: npt-1707 Date: Mon, 11 May 2026 04:13:25 +0700 Subject: [PATCH] stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/_backport/tarfile.py: Fix infinite loop in the tarfile module --- .../pip/_vendor/distlib/_backport/tarfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/_backport/tarfile.py b/stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/_backport/tarfile.py index d66d856..8b6d9a0 100644 --- a/stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/_backport/tarfile.py +++ b/stackoverflow/venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/_backport/tarfile.py @@ -1426,6 +1426,8 @@ def _proc_pax(self, tarfile): length, keyword = match.groups() length = int(length) + if length == 0: + raise InvalidHeaderError("invalid header") value = buf[match.end(2) + 1:match.start(1) + length - 1] # Normally, we could just use "utf8" as the encoding and "strict"