summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorRob Landley2006-01-10 06:19:56 +0000
committerRob Landley2006-01-10 06:19:56 +0000
commit9e4100bf95ab2f1b9a2fe76a8ac0e7a3666cd8b1 (patch)
treeec6fc0b6a656c3b98bea253f420bdf87db11f651 /archival
parent71d6ccd801446c3551192e1080232c19c62cad44 (diff)
downloadbusybox-9e4100bf95ab2f1b9a2fe76a8ac0e7a3666cd8b1.zip
busybox-9e4100bf95ab2f1b9a2fe76a8ac0e7a3666cd8b1.tar.gz
Don't return 0 when there's an error.
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/decompress_unzip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index e8767ce..4c1d178 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -973,6 +973,7 @@ extern int inflate_gunzip(int in, int out)
/* Validate decompression - crc */
if (stored_crc != (gunzip_crc ^ 0xffffffffL)) {
bb_error_msg("crc error");
+ return -1;
}
/* Validate decompression - size */
@@ -980,6 +981,7 @@ extern int inflate_gunzip(int in, int out)
(bytebuffer[bytebuffer_offset] | (bytebuffer[bytebuffer_offset+1] << 8) |
(bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) {
bb_error_msg("Incorrect length");
+ return -1;
}
return 0;