[New-bugs-announce] [issue24259] tar.extractall() does not recognize unexpected EOF
Thomas Güttler
report at bugs.python.org
Thu May 21 17:18:16 CEST 2015
New submission from Thomas Güttler:
The Python tarfile library does not detect a broken tar.
user at host$ wc -c good.tar
143360 good.tar
user at host$ head -c 130000 good.tar > cut.tar
user at host$ tar -tf cut.tar
...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Very nice, the command line tool recognizes an unexpected EOF.
user at host$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
>>> import tarfile
>>> tar=tarfile.open('cut.tar')
>>> tar.extractall()
Not nice. The Python library decodes the file, but raises no exception.
Is this a bug or feature?
Source: http://stackoverflow.com/questions/30302204/tar-extractall-does-not-recognize-unexpected-eof
----------
messages: 243755
nosy: Thomas Güttler
priority: normal
severity: normal
status: open
title: tar.extractall() does not recognize unexpected EOF
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24259>
_______________________________________
More information about the New-bugs-announce
mailing list