mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kylene Jo Hall <kjhall@us.ibm.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: PATCH] tpm: Fix pubek parsing
Date: Fri, 24 Jun 2005 15:27:26 -0500	[thread overview]
Message-ID: <1119644847.31799.9.camel@localhost.localdomain> (raw)

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

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
--- 
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");
 	}



                 reply	other threads:[~2005-06-24 20:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1119644847.31799.9.camel@localhost.localdomain \
    --to=kjhall@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®