From 2196b1825d7b557261e3db74debf4ac301ff469d Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 21 Sep 2014 14:41:51 +0200 Subject: [PATCH] Fix crash when there are two blacklist hosts without intervening reason. This is invalid configuration; the first host is supposed to be ignored. --- src/newconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index 4f2d8a67..7af7ad9d 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -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) */