[CRDA PATCH 4/6] Use the correct index when iterating over the array of public keys.

DORMANTno replies

From: Davide Pesavento <hidden>
Date: 2008-10-23 23:06:41
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Davide Pesavento <redacted>
---
 regdb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/regdb.c b/regdb.c
index f786ae3..e2e2185 100644
--- a/regdb.c
+++ b/regdb.c
@@ -102,9 +102,9 @@ int crda_verify_db_signature(__u8 *db, int dblen, int siglen)
 
 	for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) {
 		if (gcry_mpi_scan(&mpi_e, GCRYMPI_FMT_USG,
-				keys[0].e, keys[0].len_e, NULL) ||
+				keys[i].e, keys[i].len_e, NULL) ||
 		    gcry_mpi_scan(&mpi_n, GCRYMPI_FMT_USG,
-				keys[0].n, keys[0].len_n, NULL)) {
+				keys[i].n, keys[i].len_n, NULL)) {
 			fprintf(stderr, "Failed to convert numbers.\n");
 			goto out;
 		}
-- 
1.6.0.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help