Make it a fatal error if bad chksum or crc, if not we should return an error code
authorGlenn L McGrath <bug1@ihug.co.nz>
Fri, 1 Nov 2002 22:08:59 +0000 (22:08 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Fri, 1 Nov 2002 22:08:59 +0000 (22:08 -0000)
archival/libunarchive/check_trailer_gzip.c

index 215e8293fefad3b75cec3b15fe1069852c4f3ce1..2d6ceaeda13bf6034b8c4895254ce8e895fc9aad 100644 (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");
        }
 
 }