blob: 5018d45b21bce37414ce93b18f2df42f76f57e15 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001Title: Fix FTBFS with clang due to uninitialized values
2Date: 2015-06-28
3Author: Alexander <sanek23994@gmail.com>
4Bug-Debian: http://bugs.debian.org/753063
5
6Upstream-Status: Backport
7tpm-tools_1.3.9.1-0.1.debian.tar
8
9Signed-off-by: Armin kuster <akuster808@gmail.com>
10
11--- tpm-tools-1.3.8/src/tpm_mgmt/tpm_present.c 2012-05-17 21:49:58.000000000 +0400
12+++ tpm-tools-1.3.8-my/src/tpm_mgmt/tpm_present.c 2014-06-29 01:01:11.502081468 +0400
13@@ -165,7 +165,7 @@
14
15 TSS_BOOL bCmd, bHwd;
16 BOOL bRc;
17- TSS_HPOLICY hTpmPolicy;
18+ TSS_HPOLICY hTpmPolicy = 0;
19 char *pwd = NULL;
20 int pswd_len;
21 char rsp[5];
22--- tpm-tools-1.3.8/src/tpm_mgmt/tpm_takeownership.c 2010-09-30 21:28:09.000000000 +0400
23+++ tpm-tools-1.3.8-my/src/tpm_mgmt/tpm_takeownership.c 2014-06-29 01:01:51.069373655 +0400
24@@ -67,7 +67,7 @@
25 char *szSrkPasswd = NULL;
26 int tpm_len, srk_len;
27 TSS_HTPM hTpm;
28- TSS_HKEY hSrk;
29+ TSS_HKEY hSrk = 0;
30 TSS_FLAG fSrkAttrs;
31 TSS_HPOLICY hTpmPolicy, hSrkPolicy;
32 int iRc = -1;
33--- tpm-tools-1.3.8/src/tpm_mgmt/tpm_nvwrite.c 2011-08-17 16:20:35.000000000 +0400
34+++ tpm-tools-1.3.8-my/src/tpm_mgmt/tpm_nvwrite.c 2014-06-29 01:02:45.836397172 +0400
35@@ -220,7 +220,7 @@
36 close(fd);
37 fd = -1;
38 } else if (fillvalue >= 0) {
39- if (length < 0) {
40+ if (length == 0) {
41 logError(_("Requiring size parameter.\n"));
42 return -1;
43 }
44--- tpm-tools-1.3.8/src/data_mgmt/data_protect.c 2012-05-17 21:49:58.000000000 +0400
45+++ tpm-tools-1.3.8-my/src/data_mgmt/data_protect.c 2014-06-29 01:03:49.863254459 +0400
46@@ -432,8 +432,8 @@
47
48 char *pszPin = NULL;
49
50- CK_RV rv;
51- CK_SESSION_HANDLE hSession;
52+ CK_RV rv = 0;
53+ CK_SESSION_HANDLE hSession = 0;
54 CK_OBJECT_HANDLE hObject;
55 CK_MECHANISM tMechanism = { CKM_AES_ECB, NULL, 0 };
56