diff options
author | Linus Torvalds | 2009-05-19 18:43:21 -0700 |
---|---|---|
committer | Linus Torvalds | 2009-05-19 18:43:21 -0700 |
commit | 4fe1103201057e74f630b1cb8d8d49bd6ce0e666 (patch) | |
tree | 013bf0394f8f9e6005e5378f2240a229a46c3825 | |
parent | 007a93a1bac9a7c8a936204d0c063faa824942f3 (diff) | |
parent | fbaa58696cef848de818768783ef185bd3f05158 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
TPM: get_event_name stack corruption
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index ed306eb1057f..0c2f55a38b95 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c @@ -212,7 +212,8 @@ static int get_event_name(char *dest, struct tcpa_event *event, unsigned char * event_entry) { const char *name = ""; - char data[40] = ""; + /* 41 so there is room for 40 data and 1 nul */ + char data[41] = ""; int i, n_len = 0, d_len = 0; struct tcpa_pc_event *pc_event; |