diff --git a/session.c b/session.c index 3ed4519..13a2ef3 100644 --- a/session.c +++ b/session.c @@ -822,7 +822,7 @@ rpc_login_test_password(const char *hash, const char *password) crypt_hash = crypt(password, hash); - return !strcmp(crypt_hash, hash); + return (crypt_hash && !strcmp(crypt_hash, hash)); } static struct uci_section *