[New-bugs-announce] [issue16859] tarfile.TarInfo.fromtarfile does not check read() return value

Марк Коренберг report at bugs.python.org
Fri Jan 4 08:55:22 CET 2013


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

tarfile.TarInfo.fromtarfile does not check read() return value.
read() may return less than requested size, so,

buf = tarfile.fileobj.read(BLOCKSIZE)
...
obj.offset = tarfile.fileobj.tell() - BLOCKSIZE

may do something nasty.

----------
messages: 179006
nosy: mmarkk
priority: normal
severity: normal
status: open
title: tarfile.TarInfo.fromtarfile does not check read() return value

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16859>
_______________________________________


More information about the New-bugs-announce mailing list