From: Tim Kientzle Date: Sun, 13 Oct 2024 07:42:38 +0000 (-0700) Subject: Ignore checksum mismatches when fuzzing tar archives (#2378) X-Git-Tag: v3.8.0~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=971c043a1df850c9ccfc155c80c64b0673d7daa4;p=thirdparty%2Flibarchive.git Ignore checksum mismatches when fuzzing tar archives (#2378) This should speed up fuzzing just a bit, so we can find more bugs! --- diff --git a/libarchive/archive_read_support_format_tar.c b/libarchive/archive_read_support_format_tar.c index a0ff8b1db..ecaf6c392 100644 --- a/libarchive/archive_read_support_format_tar.c +++ b/libarchive/archive_read_support_format_tar.c @@ -1005,7 +1005,12 @@ checksum(struct archive_read *a, const void *h) if (sum == check) return (1); +#if DONT_FAIL_ON_CRC_ERROR + /* Speed up fuzzing by pretending the checksum is always right. */ + return (1); +#else return (0); +#endif } /*