aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds2009-05-19 18:43:21 -0700
committerLinus Torvalds2009-05-19 18:43:21 -0700
commit4fe1103201057e74f630b1cb8d8d49bd6ce0e666 (patch)
tree013bf0394f8f9e6005e5378f2240a229a46c3825
parent007a93a1bac9a7c8a936204d0c063faa824942f3 (diff)
parentfbaa58696cef848de818768783ef185bd3f05158 (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.c3
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;