aboutsummaryrefslogtreecommitdiff
path: root/archival/libarchive/get_header_tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libarchive/get_header_tar.c')
-rw-r--r--archival/libarchive/get_header_tar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c
index bc09756ba..32f842095 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)
198 * the message and we don't check whether we indeed 198 * the message and we don't check whether we indeed
199 * saw zero block directly before this. */ 199 * saw zero block directly before this. */
200 if (i == 0) { 200 if (i == 0) {
201 xfunc_error_retval = 0; 201 bb_error_msg("short read");
202 short_read: 202 /* this merely signals end of archive, not exit(1): */
203 bb_error_msg_and_die("short read"); 203 return EXIT_FAILURE;
204 } 204 }
205 if (i != 512) { 205 if (i != 512) {
206 IF_FEATURE_TAR_AUTODETECT(goto autodetect;) 206 IF_FEATURE_TAR_AUTODETECT(goto autodetect;)
207 goto short_read; 207 bb_error_msg_and_die("short read");
208 } 208 }
209 209
210#else 210#else
@@ -221,10 +221,10 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
221 */ 221 */
222 while (full_read(archive_handle->src_fd, &tar, 512) == 512) 222 while (full_read(archive_handle->src_fd, &tar, 512) == 512)
223 continue; 223 continue;
224 return EXIT_FAILURE; 224 return EXIT_FAILURE; /* "end of archive" */
225 } 225 }
226 archive_handle->tar__end = 1; 226 archive_handle->tar__end = 1;
227 return EXIT_SUCCESS; 227 return EXIT_SUCCESS; /* "decoded one header" */
228 } 228 }
229 archive_handle->tar__end = 0; 229 archive_handle->tar__end = 0;
230 230
@@ -471,5 +471,5 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
471 free(file_header->tar__uname); 471 free(file_header->tar__uname);
472 free(file_header->tar__gname); 472 free(file_header->tar__gname);
473#endif 473#endif
474 return EXIT_SUCCESS; 474 return EXIT_SUCCESS; /* "decoded one header" */
475} 475}