diff options
Diffstat (limited to 'common/password.c')
-rw-r--r-- | common/password.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/password.c b/common/password.c index 0cb79b8648..43c5e0cc0e 100644 --- a/common/password.c +++ b/common/password.c @@ -288,6 +288,10 @@ static int check_passwd(unsigned char *passwd, size_t length) hash_len = PBKDF2_LENGTH; } else { d = digest_alloc(PASSWD_SUM); + if (!d) { + pr_err("No such digest: %s\n", PASSWD_SUM); + return -ENOENT; + } hash_len = digest_length(d); } |