]> git.hungrycats.org Git - linux/commitdiff
[CRYPTO]: crypto_alg_lookup() should fail when passed a NULL name.
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Thu, 30 Oct 2003 02:24:51 +0000 (18:24 -0800)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Thu, 30 Oct 2003 02:24:51 +0000 (18:24 -0800)
crypto/api.c

index 4eec20b963d9c0b113c2a5e4cf4ad87f310b79e5..6f0e625714bf246a57b6a640f407e02f65140b41 100644 (file)
@@ -36,6 +36,9 @@ static inline void crypto_alg_put(struct crypto_alg *alg)
 struct crypto_alg *crypto_alg_lookup(const char *name)
 {
        struct crypto_alg *q, *alg = NULL;
+
+       if (!name)
+               return NULL;
        
        down_read(&crypto_alg_sem);