summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--session.c2
1 files changed, 1 insertions, 1 deletions
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 *