Fail silently if a partial tar header is read as tar.bz2 is leaving trailing junk (not sure why), add some missing files

This commit is contained in:
Glenn L McGrath
2002-11-05 02:56:57 +00:00
parent 18bbca18ac
commit 7f2a95319b
7 changed files with 105 additions and 5 deletions

View File

@@ -52,8 +52,8 @@ extern char get_header_tar(archive_handle_t *archive_handle)
/* Align header */
data_align(archive_handle, 512);
if (archive_xread_all_eof(archive_handle, tar.raw, 512) == 0) {
/* End of file */
if (archive_xread(archive_handle, tar.raw, 512) != 512) {
/* Assume end of file */
return(EXIT_FAILURE);
}
archive_handle->offset += 512;