]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
Fix crash when there are two blacklist hosts without intervening reason.
authorJilles Tjoelker <redacted>
Sun, 21 Sep 2014 12:41:51 +0000 (14:41 +0200)
committerJilles Tjoelker <redacted>
Sun, 21 Sep 2014 12:42:14 +0000 (14:42 +0200)
This is invalid configuration; the first host is supposed to be ignored.

src/newconf.c

index 4f2d8a67df54c47d958a82979e5d1996cbde36e9..7af7ad9de1874c48b8683a73e08c340f14ad6f5c 100644 (file)
@@ -1910,11 +1910,11 @@ conf_set_blacklist_matches(void *data)
 static void
 conf_set_blacklist_reason(void *data)
 {
-       yy_blacklist_reason = rb_strdup(data);
        rb_dlink_node *ptr, *nptr;
 
-       if (yy_blacklist_host && yy_blacklist_reason)
+       if (yy_blacklist_host && data)
        {
+               yy_blacklist_reason = rb_strdup(data);
                if (yy_blacklist_ipv6)
                {
                        /* Make sure things fit (64 = alnum count + dots) */