aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-01 22:08:59 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-01 22:08:59 +0000
commitb2f67b406893b228e9cc50160a448e85c196e506 (patch)
tree19ae9d963f7be13eb6fa14916b9173fce7c53c58
parent563ac6e789a3fdf438121df9a965f53a254bfff0 (diff)
downloadbusybox-w32-b2f67b406893b228e9cc50160a448e85c196e506.tar.gz
busybox-w32-b2f67b406893b228e9cc50160a448e85c196e506.tar.bz2
busybox-w32-b2f67b406893b228e9cc50160a448e85c196e506.zip
Make it a fatal error if bad chksum or crc, if not we should return an error code
-rw-r--r--archival/libunarchive/check_trailer_gzip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/libunarchive/check_trailer_gzip.c b/archival/libunarchive/check_trailer_gzip.c
index 215e8293f..2d6ceaeda 100644
--- a/archival/libunarchive/check_trailer_gzip.c
+++ b/archival/libunarchive/check_trailer_gzip.c
@@ -49,14 +49,14 @@ extern void check_trailer_gzip(int src_fd)
49 49
50 /* Validate decompression - crc */ 50 /* Validate decompression - crc */
51 if (stored_crc != (gunzip_crc ^ 0xffffffffL)) { 51 if (stored_crc != (gunzip_crc ^ 0xffffffffL)) {
52 error_msg("invalid compressed data--crc error"); 52 error_msg_and_die("invalid compressed data--crc error");
53 } 53 }
54 54
55 /* Validate decompression - size */ 55 /* Validate decompression - size */
56 if (gunzip_bytes_out != 56 if (gunzip_bytes_out !=
57 (gunzip_in_buffer[4] | (gunzip_in_buffer[5] << 8) | 57 (gunzip_in_buffer[4] | (gunzip_in_buffer[5] << 8) |
58 (gunzip_in_buffer[6] << 16) | (gunzip_in_buffer[7] << 24))) { 58 (gunzip_in_buffer[6] << 16) | (gunzip_in_buffer[7] << 24))) {
59 error_msg("invalid compressed data--length error"); 59 error_msg_and_die("invalid compressed data--length error");
60 } 60 }
61 61
62} 62}