Blame SOURCES/ekservaddr.patch

a5f4ba
diff -ur tpm2.0-tools-1.1.0/src/tpm2_getmanufec.cpp tpm2.0-tools-1.1.0-new/src/tpm2_getmanufec.cpp
a5f4ba
--- tpm2.0-tools-1.1.0/src/tpm2_getmanufec.cpp	2017-04-05 11:26:04.740073304 -0700
a5f4ba
+++ tpm2.0-tools-1.1.0-new/src/tpm2_getmanufec.cpp	2017-04-05 11:26:53.973845213 -0700
a5f4ba
@@ -615,8 +615,7 @@
a5f4ba
                 printf("TPM Manufacturer Endorsement Credential Server Address cannot be NULL\n");
a5f4ba
                 return -99;
a5f4ba
             }
a5f4ba
-            EKserverAddr = (char *)malloc(strlen(optarg));
a5f4ba
-            strncpy(EKserverAddr, optarg, strlen(optarg));
a5f4ba
+            EKserverAddr = strdup(optarg);
a5f4ba
             printf("TPM Manufacturer EK provisioning address -- %s\n", EKserverAddr);
a5f4ba
             break;
a5f4ba
         default: