]> jfr.im git - irc/freenode/syn.git/commitdiff
Don't search for a kline on a null string
authorStephen Bennett <redacted>
Sat, 30 Jan 2010 20:40:15 +0000 (20:40 +0000)
committerStephen Bennett <redacted>
Sat, 30 Jan 2010 20:41:00 +0000 (20:41 +0000)
gateways.c

index 88b8d6df52e349616b3f5415cce41bc4de4e678a..ddb2e41f354d786db8d5fddf4c3a625c0e5307df 100644 (file)
@@ -117,7 +117,7 @@ static void gateway_newuser(hook_user_nick_t *data)
         data->u = NULL;
         return;
     }
-    else if ((k = syn_find_kline(NULL, p)))
+    else if (p && (k = syn_find_kline(NULL, p)))
     {
         syn_report("Killing user %s; realname host matches K:line [%s@%s] (%s)", u->nick, k->user, k->host, k->reason);
         syn_kill(u, "Your reported hostname [%s] is banned: %s", p, k->reason);