New submission from Марк Коренберг:

tarfile.py: _FileInFile():

(near line 687)

b = self.fileobj.read(length)
if len(b) != length:
    raise ReadError("unexpected end of data")

every read() API does not guarantee that it will read `length` bytes. So, if 
fileobj reads less than requestedm that is not an error (!)

In my case it was a pipe...

----------
components: Library (Lib)
messages: 264450
nosy: mmarkk
priority: normal
severity: normal
status: open
title: tarfile use wrong code when read from fileobj
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26877>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to