diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /archival/unzip.c | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'archival/unzip.c')
-rw-r--r-- | archival/unzip.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/archival/unzip.c b/archival/unzip.c index 4e8ed0eae..759456c1d 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -325,7 +325,7 @@ static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf) | |||
325 | static void die_if_bad_fnamesize(unsigned sz) | 325 | static void die_if_bad_fnamesize(unsigned sz) |
326 | { | 326 | { |
327 | if (sz > 0xfff) /* more than 4k?! no funny business please */ | 327 | if (sz > 0xfff) /* more than 4k?! no funny business please */ |
328 | bb_error_msg_and_die("bad archive"); | 328 | bb_simple_error_msg_and_die("bad archive"); |
329 | } | 329 | } |
330 | 330 | ||
331 | static void unzip_skip(off_t skip) | 331 | static void unzip_skip(off_t skip) |
@@ -365,7 +365,7 @@ static void unzip_extract_symlink(llist_t **symlink_placeholders, | |||
365 | xread(zip_fd, target, zip->fmt.ucmpsize); | 365 | xread(zip_fd, target, zip->fmt.ucmpsize); |
366 | } else { | 366 | } else { |
367 | #if 1 | 367 | #if 1 |
368 | bb_error_msg_and_die("compressed symlink is not supported"); | 368 | bb_simple_error_msg_and_die("compressed symlink is not supported"); |
369 | #else | 369 | #else |
370 | transformer_state_t xstate; | 370 | transformer_state_t xstate; |
371 | init_transformer_state(&xstate); | 371 | init_transformer_state(&xstate); |
@@ -405,10 +405,10 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
405 | if (zip->fmt.method == 8) { | 405 | if (zip->fmt.method == 8) { |
406 | /* Method 8 - inflate */ | 406 | /* Method 8 - inflate */ |
407 | if (inflate_unzip(&xstate) < 0) | 407 | if (inflate_unzip(&xstate) < 0) |
408 | bb_error_msg_and_die("inflate error"); | 408 | bb_simple_error_msg_and_die("inflate error"); |
409 | /* Validate decompression - crc */ | 409 | /* Validate decompression - crc */ |
410 | if (zip->fmt.crc32 != (xstate.crc32 ^ 0xffffffffL)) { | 410 | if (zip->fmt.crc32 != (xstate.crc32 ^ 0xffffffffL)) { |
411 | bb_error_msg_and_die("crc error"); | 411 | bb_simple_error_msg_and_die("crc error"); |
412 | } | 412 | } |
413 | } | 413 | } |
414 | #if ENABLE_FEATURE_UNZIP_BZIP2 | 414 | #if ENABLE_FEATURE_UNZIP_BZIP2 |
@@ -418,7 +418,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
418 | */ | 418 | */ |
419 | xstate.bytes_out = unpack_bz2_stream(&xstate); | 419 | xstate.bytes_out = unpack_bz2_stream(&xstate); |
420 | if (xstate.bytes_out < 0) | 420 | if (xstate.bytes_out < 0) |
421 | bb_error_msg_and_die("inflate error"); | 421 | bb_simple_error_msg_and_die("inflate error"); |
422 | } | 422 | } |
423 | #endif | 423 | #endif |
424 | #if ENABLE_FEATURE_UNZIP_LZMA | 424 | #if ENABLE_FEATURE_UNZIP_LZMA |
@@ -426,7 +426,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
426 | /* Not tested yet */ | 426 | /* Not tested yet */ |
427 | xstate.bytes_out = unpack_lzma_stream(&xstate); | 427 | xstate.bytes_out = unpack_lzma_stream(&xstate); |
428 | if (xstate.bytes_out < 0) | 428 | if (xstate.bytes_out < 0) |
429 | bb_error_msg_and_die("inflate error"); | 429 | bb_simple_error_msg_and_die("inflate error"); |
430 | } | 430 | } |
431 | #endif | 431 | #endif |
432 | #if ENABLE_FEATURE_UNZIP_XZ | 432 | #if ENABLE_FEATURE_UNZIP_XZ |
@@ -434,7 +434,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
434 | /* Not tested yet */ | 434 | /* Not tested yet */ |
435 | xstate.bytes_out = unpack_xz_stream(&xstate); | 435 | xstate.bytes_out = unpack_xz_stream(&xstate); |
436 | if (xstate.bytes_out < 0) | 436 | if (xstate.bytes_out < 0) |
437 | bb_error_msg_and_die("inflate error"); | 437 | bb_simple_error_msg_and_die("inflate error"); |
438 | } | 438 | } |
439 | #endif | 439 | #endif |
440 | else { | 440 | else { |
@@ -445,7 +445,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
445 | if (zip->fmt.ucmpsize != xstate.bytes_out) { | 445 | if (zip->fmt.ucmpsize != xstate.bytes_out) { |
446 | /* Don't die. Who knows, maybe len calculation | 446 | /* Don't die. Who knows, maybe len calculation |
447 | * was botched somewhere. After all, crc matched! */ | 447 | * was botched somewhere. After all, crc matched! */ |
448 | bb_error_msg("bad length"); | 448 | bb_simple_error_msg("bad length"); |
449 | } | 449 | } |
450 | } | 450 | } |
451 | 451 | ||
@@ -453,7 +453,7 @@ static void my_fgets80(char *buf80) | |||
453 | { | 453 | { |
454 | fflush_all(); | 454 | fflush_all(); |
455 | if (!fgets(buf80, 80, stdin)) { | 455 | if (!fgets(buf80, 80, stdin)) { |
456 | bb_perror_msg_and_die("can't read standard input"); | 456 | bb_simple_perror_msg_and_die("can't read standard input"); |
457 | } | 457 | } |
458 | } | 458 | } |
459 | 459 | ||