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