[New-bugs-announce] [issue26877] tarfile use wrong code when read from fileobj
Марк Коренберг
report at bugs.python.org
Thu Apr 28 17:44:42 EDT 2016
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 <report at bugs.python.org>
<http://bugs.python.org/issue26877>
_______________________________________
More information about the New-bugs-announce
mailing list