From: Andreas Steffen Date: Mon, 9 Apr 2018 09:07:16 +0000 (+0200) Subject: libtpmtss: Properly initialize tabrmd tcti_context X-Git-Tag: 5.6.3dr1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55cce124bf3195b9b3584e3ae5651aea12a3ef11;p=thirdparty%2Fstrongswan.git libtpmtss: Properly initialize tabrmd tcti_context --- diff --git a/src/libtpmtss/tpm_tss_tss2.c b/src/libtpmtss/tpm_tss_tss2.c index 8b91fb44ae..90a16c103e 100644 --- a/src/libtpmtss/tpm_tss_tss2.c +++ b/src/libtpmtss/tpm_tss_tss2.c @@ -278,8 +278,9 @@ static bool initialize_tcti_tabrmd_context(private_tpm_tss_tss2_t *this) return FALSE; } - /* allocate memory for tcti context */ + /* allocate and initialize memory for tcti context */ this->tcti_context = (TSS2_TCTI_CONTEXT*)malloc(tcti_context_size); + memset(this->tcti_context, 0x00, tcti_context_size); /* initialize tcti context */ rval = tss2_tcti_tabrmd_init(this->tcti_context, &tcti_context_size);