Make it a fatal error if bad chksum or crc, if not we should return an error code

This commit is contained in:
Glenn L McGrath 2002-11-01 22:08:59 +00:00
parent 563ac6e789
commit b2f67b4068

View File

@ -49,14 +49,14 @@ extern void check_trailer_gzip(int src_fd)
/* Validate decompression - crc */
if (stored_crc != (gunzip_crc ^ 0xffffffffL)) {
error_msg("invalid compressed data--crc error");
error_msg_and_die("invalid compressed data--crc error");
}
/* Validate decompression - size */
if (gunzip_bytes_out !=
(gunzip_in_buffer[4] | (gunzip_in_buffer[5] << 8) |
(gunzip_in_buffer[6] << 16) | (gunzip_in_buffer[7] << 24))) {
error_msg("invalid compressed data--length error");
error_msg_and_die("invalid compressed data--length error");
}
}