summaryrefslogtreecommitdiff
path: root/crypto/cryptomgr.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-09-28 09:06:11 +0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:45 -0700
commit3360a074873a0970b661a1b52f714162c995a1e2 (patch)
treefd773b2aeac3eaae284c0499c28adf503a992961 /crypto/cryptomgr.c
parent69eabd014a0038510b56fa8755a352c141e6af3b (diff)
downloadlinux-crypto-3360a074873a0970b661a1b52f714162c995a1e2.tar.gz
linux-crypto-3360a074873a0970b661a1b52f714162c995a1e2.zip
[CRYPTO] cryptomgr: Fix parsing of recursive algorithms
As Joy Latten points out, inner algorithm parameters will miss the closing bracket which will also cause the outer algorithm to terminate prematurely. This patch fixes that also kills the WARN_ON if the number of parameters exceed the maximum as that is a user error. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/cryptomgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cryptomgr.c b/crypto/cryptomgr.c
index c83884fe..e5e3cf84 100644
--- a/crypto/cryptomgr.c
+++ b/crypto/cryptomgr.c
@@ -129,6 +129,7 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
}
notnum = 1;
+ p++;
}
len = p - name;
@@ -151,7 +152,7 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
param->tb[i + 1] = &param->attrs[i].attr;
i++;
- if (WARN_ON(i >= CRYPTO_MAX_ATTRS))
+ if (i >= CRYPTO_MAX_ATTRS)
goto err_free_param;
if (*p == ')')