From b08c5ef702b6e91d2608676fc48fe9bf9f07e80f Mon Sep 17 00:00:00 2001 From: okir Date: Thu, 18 Apr 2002 09:12:26 +0000 Subject: [PATCH] - bug in check_key_compatibility() git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@561 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs15init/pkcs15-lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c index cac31530..6096b9db 100644 --- a/src/pkcs15init/pkcs15-lib.c +++ b/src/pkcs15init/pkcs15-lib.c @@ -777,8 +777,7 @@ check_key_compatibility(struct sc_pkcs15_card *p15card, unsigned int count; count = p15card->card->algorithm_count; - info = p15card->card->algorithms; - while (count--) { + for (info = p15card->card->algorithms; count--; info++) { /* XXX: check for equality, or <= ? */ if (info->algorithm != key->algorithm || info->key_length != key_length)