From ed61e44940925b8ff90ac5d33a530750691f8ac6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 29 Jan 2024 09:37:26 +0100 Subject: [PATCH] Suppress GCC 14 allocation size warning --- tboot-gcc14.patch | 17 +++++++++++++++++ tboot.spec | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tboot-gcc14.patch diff --git a/tboot-gcc14.patch b/tboot-gcc14.patch new file mode 100644 index 0000000..9b6ff83 --- /dev/null +++ b/tboot-gcc14.patch @@ -0,0 +1,17 @@ +Suppress GCC 14 allocation size warning in lcptools-v2/pconf_legacy.c + +Submitted upstream: + +diff --git a/lcptools-v2/pconf_legacy.c b/lcptools-v2/pconf_legacy.c +index 443b5cd5525b9fe1..5ebc6c451f7008b1 100644 +--- a/lcptools-v2/pconf_legacy.c ++++ b/lcptools-v2/pconf_legacy.c +@@ -324,7 +324,7 @@ static lcp_policy_element_t *create(void) + ERROR("Error: no pcrs were selected.\n"); + return NULL; + } +- digest = malloc(SHA1_DIGEST_SIZE); ++ digest = malloc(sizeof(*digest)); + if (digest == NULL) { + ERROR("Error: failed to allocate memory for digest buffer.\n"); + return NULL; diff --git a/tboot.spec b/tboot.spec index 27e8803..5081378 100644 --- a/tboot.spec +++ b/tboot.spec @@ -1,12 +1,13 @@ Summary: Performs a verified launch using Intel TXT Name: tboot Version: 1.11.1 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 License: BSD-3-Clause URL: http://sourceforge.net/projects/tboot/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: tboot-gcc14.patch BuildRequires: make BuildRequires: gcc @@ -73,6 +74,9 @@ grub2-mkconfig -o /etc/grub2.cfg /boot/tboot-syms %changelog +* Mon Jan 29 2024 Florian Weimer - 1:1.11.1-6 +- Suppress GCC 14 allocation size warning + * Sat Jan 27 2024 Fedora Release Engineering - 1:1.11.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild