[issue32435] tarfile recognizes .gz file as tar

Sergey Petrunin report at bugs.python.org
Wed Dec 27 16:56:20 EST 2017


New submission from Sergey Petrunin <sergey.petrunin at nih.gov>:

Library's function 'tarfile.is_tarfile' returns 'True' on GZip file (9.7 megabytes see attachment), that is a file with 10 gigabytes of '0' character compressed with 'gzip' utility (no 'tar' whatsoever).

Desired result: this function should return False in this case, b.c. this file is not a tar file.

----------
components: Library (Lib)
files: big_0_file_1.gz
messages: 309106
nosy: spetrunin
priority: normal
severity: normal
status: open
title: tarfile recognizes .gz file as tar
versions: Python 2.7, Python 3.6
Added file: https://bugs.python.org/file47353/big_0_file_1.gz

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


More information about the Python-bugs-list mailing list