aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-24 13:49:12 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-24 13:49:12 +0200
commit77bf05dfe39c507eafc6421ac66b4613aab5509f (patch)
tree8f4ec1f44fdc6100f8643e445b21b41c6245dd1c
parentdf45eb49acaeb64574e14f78c6bb5b95f1157058 (diff)
downloadbusybox-w32-77bf05dfe39c507eafc6421ac66b4613aab5509f.tar.gz
busybox-w32-77bf05dfe39c507eafc6421ac66b4613aab5509f.tar.bz2
busybox-w32-77bf05dfe39c507eafc6421ac66b4613aab5509f.zip
unlzma: do emit the error message on bad input, when we exit with 1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/libarchive/decompress_unlzma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/archival/libarchive/decompress_unlzma.c b/archival/libarchive/decompress_unlzma.c
index 42efd5aa7..446319e7b 100644
--- a/archival/libarchive/decompress_unlzma.c
+++ b/archival/libarchive/decompress_unlzma.c
@@ -498,6 +498,12 @@ unpack_lzma_stream(transformer_state_t *xstate)
498 IF_DESKTOP(total_written += buffer_pos;) 498 IF_DESKTOP(total_written += buffer_pos;)
499 if (transformer_write(xstate, buffer, buffer_pos) != (ssize_t)buffer_pos) { 499 if (transformer_write(xstate, buffer, buffer_pos) != (ssize_t)buffer_pos) {
500 bad: 500 bad:
501 /* One of our users, bbunpack(), expects _us_ to emit
502 * the error message (since it's the best place to give
503 * potentially more detailed information).
504 * Do not fail silently.
505 */
506 bb_error_msg("corrupted data");
501 total_written = -1; /* failure */ 507 total_written = -1; /* failure */
502 } 508 }
503 rc_free(rc); 509 rc_free(rc);