diff options
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 1cbde95..4394d23 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -56,11 +56,7 @@ char get_header_tar(archive_handle_t *archive_handle) /* Align header */ data_align(archive_handle, 512); - if (bb_full_read(archive_handle->src_fd, tar.raw, 512) != 512) { - /* Assume end of file */ - bb_error_msg_and_die("Short header"); - //return(EXIT_FAILURE); - } + xread(archive_handle->src_fd, tar.raw, 512); archive_handle->offset += 512; /* If there is no filename its an empty header */ @@ -69,7 +65,7 @@ char get_header_tar(archive_handle_t *archive_handle) /* This is the second consecutive empty header! End of archive! * Read until the end to empty the pipe from gz or bz2 */ - while (bb_full_read(archive_handle->src_fd, tar.raw, 512) == 512); + while (full_read(archive_handle->src_fd, tar.raw, 512) == 512); return(EXIT_FAILURE); } end = 1; @@ -166,14 +162,14 @@ char get_header_tar(archive_handle_t *archive_handle) #ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS case 'L': { longname = xzalloc(file_header->size + 1); - archive_xread_all(archive_handle, longname, file_header->size); + xread(archive_handle->src_fd, longname, file_header->size); archive_handle->offset += file_header->size; return(get_header_tar(archive_handle)); } case 'K': { linkname = xzalloc(file_header->size + 1); - archive_xread_all(archive_handle, linkname, file_header->size); + xread(archive_handle->src_fd, linkname, file_header->size); archive_handle->offset += file_header->size; file_header->name = linkname; |