aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-05 02:56:57 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-05 02:56:57 +0000
commit7f2a95319b640d8a40e370352cc4a8d8b8d63e0e (patch)
tree4a3208eb2fd77b946ccedaff5de898f877eb36cc /archival/libunarchive/get_header_tar.c
parent18bbca18acf229875f2bb60cc37c3e8c22d237bc (diff)
downloadbusybox-7f2a95319b640d8a40e370352cc4a8d8b8d63e0e.tar.gz
Fail silently if a partial tar header is read as tar.bz2 is leaving trailing junk (not sure why), add some missing files
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r--archival/libunarchive/get_header_tar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 20451d996..d3ff1608a 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -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;