[issue36596] tarfile module considers anything starting with 512 bytes of zero bytes to be a valid tar file

Read Hughes report at bugs.python.org
Thu Apr 18 10:05:03 EDT 2019


Read Hughes <hughes.read at gmail.com> added the comment:

GNU description of tar file format: http://www.gnu.org/software/tar/manual/html_node/Standard.html

Particular quotes that are relevant:

>Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which consists of two 512 blocks of zero bytes

>Each file archived is represented by a header block which describes the file, followed by zero or more blocks which give the contents of the file. At the end of the archive file there are two 512-byte blocks filled with binary zeros as an end-of-file marker

The header itself is 257 bytes padded with NUL until it reaches 512.

No input other than this, just trying to bring any relevant information to this issue that may help

----------
nosy: +rthugh02

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36596>
_______________________________________


More information about the Python-bugs-list mailing list