提交 b3811d36 编写于 作者: C Chun-Yi Lee 提交者: David Howells

KEYS: checking the input id parameters before finding asymmetric key

For finding asymmetric key, the input id_0 and id_1 parameters can
not be NULL at the same time. This patch adds the BUG_ON checking
for id_0 and id_1.

Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: NChun-Yi Lee <jlee@suse.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 6a6d2a77
...@@ -57,6 +57,8 @@ struct key *find_asymmetric_key(struct key *keyring, ...@@ -57,6 +57,8 @@ struct key *find_asymmetric_key(struct key *keyring,
char *req, *p; char *req, *p;
int len; int len;
BUG_ON(!id_0 && !id_1);
if (id_0) { if (id_0) {
lookup = id_0->data; lookup = id_0->data;
len = id_0->len; len = id_0->len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册