diff -Nru libtpms-0.8.0~dev1/debian/changelog libtpms-0.8.0~dev1/debian/changelog --- libtpms-0.8.0~dev1/debian/changelog 2020-08-08 17:31:09.000000000 +0000 +++ libtpms-0.8.0~dev1/debian/changelog 2020-12-09 19:31:25.000000000 +0000 @@ -1,3 +1,10 @@ +libtpms (0.8.0~dev1-1.2ubuntu1) hirsute; urgency=medium + + * debian/patches/uninitialized-variable.patch: fix issues of variables + that may be used before initialization. + + -- Steve Langasek Wed, 09 Dec 2020 19:31:25 +0000 + libtpms (0.8.0~dev1-1.2) unstable; urgency=medium *Fix a non-reproducible bug caused by the invalid path (Closes: #964768) diff -Nru libtpms-0.8.0~dev1/debian/control libtpms-0.8.0~dev1/debian/control --- libtpms-0.8.0~dev1/debian/control 2020-08-08 17:31:09.000000000 +0000 +++ libtpms-0.8.0~dev1/debian/control 2020-12-09 19:31:18.000000000 +0000 @@ -1,5 +1,6 @@ Source: libtpms -Maintainer: Seunghun Han +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Seunghun Han Section: libs Priority: optional Standards-Version: 4.5.0 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 17:31:09.000000000 +0000 +++ libtpms-0.8.0~dev1/debian/patches/series 2020-12-09 16:57:06.000000000 +0000 @@ -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 1970-01-01 00:00:00.000000000 +0000 +++ libtpms-0.8.0~dev1/debian/patches/uninitialized-variable.patch 2020-12-09 19:31:11.000000000 +0000 @@ -0,0 +1,31 @@ +Description: fix issues of variables that may be used before initialization + Detected by gcc on Ubuntu/s390x +Author: Steve Langasek +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;