diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2015-07-02 17:37:08 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2015-07-02 17:37:08 (GMT) |
commit | d048003d909360faf716c84459ed7067bdee5f08 (patch) | |
tree | 511aa9bdc019942ea67b16d2e557502587183eb4 /Lib/tarfile.py | |
parent | 97cceac3bd8fab9481deeaaafe82ce3de27e7e3f (diff) | |
download | cpython-d048003d909360faf716c84459ed7067bdee5f08.zip cpython-d048003d909360faf716c84459ed7067bdee5f08.tar.gz cpython-d048003d909360faf716c84459ed7067bdee5f08.tar.bz2 |
Issue #24514: tarfile now tolerates number fields consisting of only whitespace.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 082f361..d7c1500 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -186,7 +186,7 @@ def nti(s): # itn() below. if s[0] != chr(0200): try: - n = int(nts(s) or "0", 8) + n = int(nts(s).strip() or "0", 8) except ValueError: raise InvalidHeaderError("invalid header") else: |