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