From 3af83ee6e7f513aa1aa3eec1998fc3c65b5131f5 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 3 Jun 2024 01:30:14 +0200 Subject: [PATCH] 7zip: Fix DONT_FAIL_ON_CRC_ERROR check (#2197) This actually disabled CRC checks on regular builds and enabled it if CRC checks were supposed to be disabled. All other occurrences properly use ifndef instead of ifdef. --- libarchive/archive_read_support_format_7zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c index 13c4b071d..8573ff18f 100644 --- a/libarchive/archive_read_support_format_7zip.c +++ b/libarchive/archive_read_support_format_7zip.c @@ -3010,7 +3010,7 @@ slurp_central_directory(struct archive_read *a, struct _7zip *zip, /* CRC check. */ if (crc32(0, (const unsigned char *)p + 12, 20) != archive_le32dec(p + 8)) { -#ifdef DONT_FAIL_ON_CRC_ERROR +#ifndef DONT_FAIL_ON_CRC_ERROR archive_set_error(&a->archive, -1, "Header CRC error"); return (ARCHIVE_FATAL); #endif -- 2.47.2