From: Kylene Jo Hall Date: Sat, 25 Jun 2005 21:55:40 +0000 (-0700) Subject: [PATCH] tpm: Fix pubek parsing X-Git-Tag: v2.6.13-rc1~68^2~165 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1dda8abe6feb906306a627b170654ddd8addcdac;p=linux-2.6-omap-h63xx.git [PATCH] tpm: Fix pubek parsing Fix parsing of the PUBEK for display which was leading to showing the wrong modulus length and modulus. Signed-off-by: Kylene Hall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 5c843c9bf81..1156d11f02d 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -233,10 +233,10 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, data[15], data[16], data[17], data[22], data[23], data[24], data[25], data[26], data[27], data[28], data[29], data[30], data[31], data[32], data[33], - be32_to_cpu(*((__be32 *) (data + 32)))); + be32_to_cpu(*((__be32 *) (data + 34)))); for (i = 0; i < 256; i++) { - str += sprintf(str, "%02X ", data[i + 39]); + str += sprintf(str, "%02X ", data[i + 38]); if ((i + 1) % 16 == 0) str += sprintf(str, "\n"); }