Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #11 from coreos/fix_tpm
Browse files Browse the repository at this point in the history
Fix unallocated memory access in TPM eventlog code
  • Loading branch information
mjg59 committed Mar 2, 2016
2 parents a50f8ef + e881844 commit 7aff6d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/char/tpm/tpm_eventlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)

tempPtr = (char *)&temp_event;

for (i = 0; i < sizeof(struct tcpa_event) + temp_event.event_size; i++)
for (i = 0; i < sizeof(struct tcpa_event); i++)
seq_putc(m, tempPtr[i]);

tempPtr = (char *)&event->event_data;

for (i = 0; i < temp_event.event_size; i++)
seq_putc(m, tempPtr[i]);

return 0;
Expand Down

0 comments on commit 7aff6d0

Please sign in to comment.