diff options
author | Denys Vlasenko | 2013-11-19 14:44:04 +0100 |
---|---|---|
committer | Denys Vlasenko | 2013-11-19 14:44:04 +0100 |
commit | ebfa9b5aa1f1f6cd4949e1be03ebf1ce074727d1 (patch) | |
tree | e6a939e4d8b145ae0208f078a24ae89d9b7da629 /archival/libarchive/get_header_tar.c | |
parent | 8b59b2c13ededb2c82e36193b6d6e969df36531c (diff) | |
download | busybox-ebfa9b5aa1f1f6cd4949e1be03ebf1ce074727d1.zip busybox-ebfa9b5aa1f1f6cd4949e1be03ebf1ce074727d1.tar.gz |
tar: fix exitcode check for MMU-spawned unpacking helpers
Testcase: tar xvzf EMPTY_FILE
function old new delta
open_transformer 102 106 +4
get_header_tar 1781 1785 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive/get_header_tar.c')
-rw-r--r-- | archival/libarchive/get_header_tar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c index bc09756..32f8420 100644 --- a/archival/libarchive/get_header_tar.c +++ b/archival/libarchive/get_header_tar.c @@ -198,13 +198,13 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) * the message and we don't check whether we indeed * saw zero block directly before this. */ if (i == 0) { - xfunc_error_retval = 0; - short_read: - bb_error_msg_and_die("short read"); + bb_error_msg("short read"); + /* this merely signals end of archive, not exit(1): */ + return EXIT_FAILURE; } if (i != 512) { IF_FEATURE_TAR_AUTODETECT(goto autodetect;) - goto short_read; + bb_error_msg_and_die("short read"); } #else @@ -221,10 +221,10 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) */ while (full_read(archive_handle->src_fd, &tar, 512) == 512) continue; - return EXIT_FAILURE; + return EXIT_FAILURE; /* "end of archive" */ } archive_handle->tar__end = 1; - return EXIT_SUCCESS; + return EXIT_SUCCESS; /* "decoded one header" */ } archive_handle->tar__end = 0; @@ -471,5 +471,5 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) free(file_header->tar__uname); free(file_header->tar__gname); #endif - return EXIT_SUCCESS; + return EXIT_SUCCESS; /* "decoded one header" */ } |