Search Linux Wireless

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

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

 



Signed-off-by: Davide Pesavento <davidepesa@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux