diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2011-10-21 14:37:10 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-21 02:02:25 +0100 |
commit | 288195c744c8a2c7bc54373d12d95ac536416036 (patch) | |
tree | dcb63c77d5101d58145a9f9e34d6a2d62434d1c0 /crypto | |
parent | 064ee89abd02d6c39d77596a6babcb5fe0b49079 (diff) |
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>
(cherry picked from commit e6ea64ece7f4c14294b2fce5403b1e71eab87f1e)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/crypto_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 748990fa3c53..2abca780312d 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -40,7 +40,6 @@ struct crypto_dump_info { static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact) { - int match; struct crypto_alg *q, *alg = NULL; down_read(&crypto_alg_sem); @@ -49,6 +48,7 @@ static struct crypto_alg *crypto_alg_match(struct crypto_user_alg *p, int exact) return NULL; list_for_each_entry(q, &crypto_alg_list, cra_list) { + int match = 0; if ((q->cra_flags ^ p->cru_type) & p->cru_mask) continue; |