提交 720a650f 编写于 作者: H Herbert Xu 提交者: David S. Miller

[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: NHerbert Xu <herbert@gondor.apana.org.au>
上级 f19f5111
......@@ -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 == ')')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册