diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2014-04-04 14:56:18 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-04-25 10:14:20 +0300 |
commit | 0ad83e2f69e69aeea1ac0baee108c4232449e36d (patch) | |
tree | a33c56388319bcbccaffeaca53cfee02e8395dd0 /src/squark-auth-ip.c | |
parent | 184b62e95f19a8eb754d9cc443c332c1b640097c (diff) | |
download | squark-0ad83e2f69e69aeea1ac0baee108c4232449e36d.tar.bz2 squark-0ad83e2f69e69aeea1ac0baee108c4232449e36d.tar.xz |
squark-auth-ip: don't segfault if there is an error in the auth DB
Diffstat (limited to 'src/squark-auth-ip.c')
-rw-r--r-- | src/squark-auth-ip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/squark-auth-ip.c b/src/squark-auth-ip.c index 38e1f0b..9b6ab15 100644 --- a/src/squark-auth-ip.c +++ b/src/squark-auth-ip.c @@ -49,7 +49,7 @@ static void handle_line(blob_t line) if (addr_parse(ipaddr, &addr)) { token = authdb_get(&adb, &addr, &entry, 1); - if (authdb_check_login(token, &entry, BLOB_NULL, now, &adbc)) + if (token != NULL && authdb_check_login(token, &entry, BLOB_NULL, now, &adbc)) auth_ok = 1; } |