Skip to content

Commit e6ea64e

Browse files
committed
crypto: user - Initialise match in crypto_alg_match
We need to default match to 0 as otherwise it may lead to a false positive. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 573da62 commit e6ea64e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎crypto/crypto_user.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct crypto_dump_info {
4040

4141
static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact)
4242
{
43-
int match;
4443
struct crypto_alg *q, *alg = NULL;
4544

4645
down_read(&crypto_alg_sem);
@@ -49,6 +48,7 @@ static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact)
4948
return NULL;
5049

5150
list_for_each_entry(q, &crypto_alg_list, cra_list) {
51+
int match = 0;
5252

5353
if ((q->cra_flags ^ p->cru_type) & p->cru_mask)
5454
continue;

0 commit comments

Comments
 (0)