Suppress GCC 14 allocation size warning

This commit is contained in:
Florian Weimer 2024-01-29 09:37:26 +01:00
parent c21a74ed12
commit ed61e44940
2 changed files with 22 additions and 1 deletions

17
tboot-gcc14.patch Normal file
View File

@ -0,0 +1,17 @@
Suppress GCC 14 allocation size warning in lcptools-v2/pconf_legacy.c
Submitted upstream: <https://sourceforge.net/p/tboot/mailman/message/58730242/>
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;

View File

@ -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 <fweimer@redhat.com> - 1:1.11.1-6
- Suppress GCC 14 allocation size warning
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.11.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild