Your message dated Mon, 15 Aug 2022 00:55:54 +0200
with message-id <[email protected]>
and subject line Re: libtpms: possible use of variables before assignment
has caused the Debian Bug report #976992,
regarding libtpms: possible use of variables before assignment
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
976992: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976992
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libtpms
Version: 0.8.0~dev1-1.2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu hirsute ubuntu-patch
Hi Seunghun,
The libtpms package is failing to build from source on s390x in Ubuntu,
because the compiler detects that certain variables may be used before they
have been initialized. Due to some oddities in the toolchain configuration,
the compiler output is not shown in the build logs, however I've manually
analyzed the failure and identified the attached patch which will fix the
build failure.
While the issue was only detected on Ubuntu/s390x, it is a generic issue
with the code, so I think the patch should be applied for correctness.
Thanks for considering,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
[email protected] [email protected]
diff -Nru libtpms-0.8.0~dev1/debian/patches/series
libtpms-0.8.0~dev1/debian/patches/series
--- libtpms-0.8.0~dev1/debian/patches/series 2020-08-08 10:31:09.000000000
-0700
+++ libtpms-0.8.0~dev1/debian/patches/series 2020-12-09 08:57:06.000000000
-0800
@@ -2,3 +2,4 @@
0002-fix-man-page-longline-typo.patch
0003-set-man-page-date-to-last-changelog.patch
0004-fix-ftbfs-bug.patch
+uninitialized-variable.patch
diff -Nru libtpms-0.8.0~dev1/debian/patches/uninitialized-variable.patch
libtpms-0.8.0~dev1/debian/patches/uninitialized-variable.patch
--- libtpms-0.8.0~dev1/debian/patches/uninitialized-variable.patch
1969-12-31 16:00:00.000000000 -0800
+++ libtpms-0.8.0~dev1/debian/patches/uninitialized-variable.patch
2020-12-09 11:31:11.000000000 -0800
@@ -0,0 +1,31 @@
+Description: fix issues of variables that may be used before initialization
+ Detected by gcc on Ubuntu/s390x
+Author: Steve Langasek <[email protected]>
+Last-Update: 2020-12-09
+
+Index: libtpms-0.8.0~dev1/src/tpm12/tpm_nvram.c
+===================================================================
+--- libtpms-0.8.0~dev1.orig/src/tpm12/tpm_nvram.c
++++ libtpms-0.8.0~dev1/src/tpm12/tpm_nvram.c
+@@ -1997,7 +1997,7 @@
+ TPM_BOOL done = FALSE;
+ TPM_BOOL dir = FALSE;
+ TPM_BOOL writeAllNV = FALSE; /* flag to write back
NV */
+- TPM_NV_DATA_SENSITIVE *d1NvdataSensitive;
++ TPM_NV_DATA_SENSITIVE *d1NvdataSensitive = NULL;
+ uint32_t s1Last;
+ TPM_BOOL physicalPresence;
+ TPM_BOOL isGPIO = FALSE;
+Index: libtpms-0.8.0~dev1/src/tpm2/Marshal.c
+===================================================================
+--- libtpms-0.8.0~dev1.orig/src/tpm2/Marshal.c
++++ libtpms-0.8.0~dev1/src/tpm2/Marshal.c
+@@ -2219,7 +2219,7 @@
+ TPM2B_CREATION_DATA_Marshal(TPM2B_CREATION_DATA *source, BYTE **buffer, INT32
*size)
+ {
+ UINT16 written = 0;
+- BYTE *sizePtr;
++ BYTE *sizePtr = NULL;
+
+ if (buffer != NULL) {
+ sizePtr = *buffer;
--- End Message ---
--- Begin Message ---
Version: 0.8.2-1
This was fixed upstream with the integration of
https://github.com/stefanberger/libtpms/pull/156 in 0.8.0.
--- End Message ---