mafintosh / tar-stream

tar-stream is a streaming tar parser and generator.
MIT License
406 stars 92 forks source link

Unexpected end of data should raise error when extracting #82

Closed sth closed 6 years ago

sth commented 6 years ago

When the input data ends while tar-stream waits for more data to extract, it doesn't raise an error. This means that a truncated tar file will extract without reporting errors, while creating incomplete files.

If there is still missing data for a file or a partially read header, an error should be raised instead.

This issue is likely also the cause for #71. If only a short file is processed (shorter than a tar header), no errors are raised since the partial header data is never processed.