diff --git a/Adapt-to-gcc14.patch b/Adapt-to-gcc14.patch new file mode 100644 index 0000000000000000000000000000000000000000..a2c263142164c1d329540a0ff52290548d5f80cb --- /dev/null +++ b/Adapt-to-gcc14.patch @@ -0,0 +1,22 @@ +diff --git a/src/pesigcheck.c b/src/pesigcheck.c +index 6dc67f76a817..8119cf10a7b4 100644 +--- a/src/pesigcheck.c ++++ b/src/pesigcheck.c +@@ -240,7 +240,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, + + cert_iter iter; + +- reasonps = calloc(sizeof(struct reason), 512); ++ reasonps = calloc(512, sizeof(struct reason)); + if (!reasonps) + err(1, "check_signature"); + +@@ -281,7 +281,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, + + num_reasons += 16; + +- new_reasons = calloc(sizeof(struct reason), num_reasons); ++ new_reasons = calloc(num_reasons, sizeof(struct reason)); + if (!new_reasons) + err(1, "check_signature"); + reasonps = new_reasons; diff --git a/pesign.spec b/pesign.spec index fd7d8680b3b6c9698710718c0759ec06c0779f84..7399f487ecdd3d5e668fd6d784f586bcb627c593 100644 --- a/pesign.spec +++ b/pesign.spec @@ -2,7 +2,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 116 -Release: 5 +Release: 6 License: GPLv2 URL: https://github.com/rhboot/pesign Source0: https://github.com/rhboot/pesign/archive/refs/tags/116.tar.gz @@ -19,6 +19,7 @@ BuildRequires: python3-rpm-macros python3 systemd python3-devel gcc mandoc Patch0001: Bugfix-cms_common-fix-cert-match-check.patch Patch0002: 0001-cms_common-Fixed-Segmentation-fault.patch Patch0003: 0002-revert-a-dose-not-work-feature-12f1671.patch +Patch0004: Adapt-to-gcc14.patch Patch9000: Feature-pesign-support-SM3-digest-algorithm.patch Patch9001: Feature-pesign-support-SM2-signature-algorithm.patch @@ -101,6 +102,9 @@ exit 0 %{_mandir}/man*/* %changelog +* Wed Nov 05 2025 laokz - 116-6 +- Adapt to gcc14 + * Fri Dec 06 2024 Ge Wang - 116-5 - Revert a dose not work feature 12f1671