mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Make it a fatal error if bad chksum or crc, if not we should return an error code
This commit is contained in:
parent
563ac6e789
commit
b2f67b4068
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user