GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Incomplete extraction of tar archive with invalid global PAX header 'size' in tarfile · Issue #161588 · python/cpython Open Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportIf the PAX header of a tar file contains an invalid value for the keyword Let say we have 3 files -rw-r--r--@ 1 user group 71K 6 Nov 16:03 bar -rw-r--r--@ 1 user group 211K 6 Nov 16:02 foo -rw-r--r--@ 1 user group 25K 6 Nov 16:03 quux Using GNU tar to create a tar file with invalid PAX header $ tar cf invalid_size.tar --format=pax --pax-option='size=xyz' foo bar quuxNow extract that tar file using import tarfile with tarfile.open("invalid_size.tar") as tf: tf.extractall() It will only produce # using GNU tar (1.35) $ tar xvf invalid_size.tar tar: Malformed extended header: invalid size=xyz foo tar: Malformed extended header: invalid size=xyz bar tar: Malformed extended header: invalid size=xyz quux tar: Exiting with failure status due to previous errors # using bsdtar (3.5.3) $ tar xvf invalid_size.tar x foo x bar x quux Despite complaining, GNU tar still extracts the 3 files in full and bsdtar doesn't seem to care at all, it just extracts the 3 files in full without any warning message. (used To fix this, one approach is to raise an exception when it fails to parse CPython versions tested on:CPython main branch Operating systems tested on:macOS Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |