PATCH] tpm: Fix pubek parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix parsing of the PUBEK for display which was leading to showing the
wrong modulus length and modulus.

Signed-off-by: Kylene Hall <[email protected]>
--- 
Index: drivers/char/tpm/tpm.c
===================================================================
RCS file: /cvsroot/tpmdd/tpmdd/drivers/char/tpm/tpm.c,v
retrieving revision 1.28
diff -u -p -r1.28 tpm.c
--- ./drivers/char/tpm/tpm.c	15 Jun 2005 17:15:18 -0000	1.28
+++ ./drivers/char/tpm/tpm.c	23 Jun 2005 21:44:54 -0000
@@ -257,10 +266,10 @@ ssize_t tpm_show_pubek(struct device *de
 		    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");
 	}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux