diff options
Diffstat (limited to 'src/security/tpm/tspi/log.c')
-rw-r--r-- | src/security/tpm/tspi/log.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/security/tpm/tspi/log.c b/src/security/tpm/tspi/log.c index b7e59f804e..9798eabd45 100644 --- a/src/security/tpm/tspi/log.c +++ b/src/security/tpm/tspi/log.c @@ -145,6 +145,11 @@ void tpm_cb_log_copy_entries(const void *from, void *to) int i; for (i = 0; i < from_log->num_entries; i++) { + if (to_log->num_entries >= to_log->max_entries) { + printk(BIOS_ERR, "TPM LOG: log table is full\n"); + return; + } + struct tpm_cb_log_entry *tce = &to_log->entries[to_log->num_entries++]; strncpy(tce->name, from_log->entries[i].name, TPM_CB_LOG_PCR_HASH_NAME - 1); |