diff --git a/src/security/tpm/tspi/log-tpm1.c b/src/security/tpm/tspi/log-tpm1.c index 3b192d70695..fee7a606725 100644 --- a/src/security/tpm/tspi/log-tpm1.c +++ b/src/security/tpm/tspi/log-tpm1.c @@ -33,7 +33,7 @@ void *tpm1_log_cbmem_init(void) if (!tclt) return NULL; - memset(tclt, 0, sizeof(*tclt)); + memset(tclt, 0, tpm_log_len); hdr = &tclt->spec_id; /* Fill in first "header" entry. */