]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
7zip: Fix DONT_FAIL_ON_CRC_ERROR check (#2197)
authorTobias Stoeckmann <stoeckmann@users.noreply.github.com>
Sun, 2 Jun 2024 23:30:14 +0000 (01:30 +0200)
committerGitHub <noreply@github.com>
Sun, 2 Jun 2024 23:30:14 +0000 (16:30 -0700)
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

index 13c4b071d4455ed550e988e50cb3ae2a3521f5d8..8573ff18f4c8d9660d0ab9a592f8f5b095aa80d7 100644 (file)
@@ -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