git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
TPM: Call tpm_transmit with correct size
[pandora-kernel.git]
/
drivers
/
char
/
tpm
/
tpm.c
diff --git
a/drivers/char/tpm/tpm.c
b/drivers/char/tpm/tpm.c
index
caf8012
..
1fe9793
100644
(file)
--- a/
drivers/char/tpm/tpm.c
+++ b/
drivers/char/tpm/tpm.c
@@
-383,6
+383,9
@@
static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
u32 count, ordinal;
unsigned long stop;
+ if (bufsiz > TPM_BUFSIZE)
+ bufsiz = TPM_BUFSIZE;
+
count = be32_to_cpu(*((__be32 *) (buf + 2)));
ordinal = be32_to_cpu(*((__be32 *) (buf + 6)));
if (count == 0)