Commit b069904a authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[CRYPTO]: crypto_alg_lookup() should fail when passed a NULL name.

parent f083fae2
...@@ -37,6 +37,9 @@ struct crypto_alg *crypto_alg_lookup(const char *name) ...@@ -37,6 +37,9 @@ struct crypto_alg *crypto_alg_lookup(const char *name)
{ {
struct crypto_alg *q, *alg = NULL; struct crypto_alg *q, *alg = NULL;
if (!name)
return NULL;
down_read(&crypto_alg_sem); down_read(&crypto_alg_sem);
list_for_each_entry(q, &crypto_alg_list, cra_list) { list_for_each_entry(q, &crypto_alg_list, cra_list) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment