From 53ee1596bdfed79b6f95fed7aea2343b21d1b8d0 Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Fri, 24 Oct 2008 01:06:35 +0200 Subject: [PATCH] Use the correct index when iterating over the array of public keys. Signed-off-by: Davide Pesavento Signed-off-by: Luis R. Rodriguez --- regdb.c | 4 ++-- 1 file 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; } -- 2.7.4