]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
libtpmtss: Properly initialize tabrmd tcti_context
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 9 Apr 2018 09:07:16 +0000 (11:07 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 9 Apr 2018 09:07:20 +0000 (11:07 +0200)
src/libtpmtss/tpm_tss_tss2.c

index 8b91fb44aeb81c54b61cd81f30a9568012c24066..90a16c103ed86d018cce546e0c1986e594f2e165 100644 (file)
@@ -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);