mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
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>
This commit is contained in:
parent
573da6208a
commit
e6ea64ece7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user