throw error on partial header reading stream
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Mon, 10 Apr 2017 13:01:56 +0000 (15:01 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commit8a8ac4693ad2e603f002405dede02372d26dc19f
treeaf75176964c90a108ec72d454a9a797bd3bcc4c4
parentae3d0f2af5b4594ab3ea7820cd52212c83375cbb
throw error on partial header reading stream

Throw the EOF exception only if the stream ends exactly at an
object boundary. Otherwise, when less then sizeof(hdr) bytes
are returned from read(), throw InvalidHeader to indicate a
malformed file. This keeps EOF a “benign” exception.
deltatar/crypto.py
deltatar/tarfile.py