From a6ee2cf14d1094bac302e1ef84d7ac05ca1d3ff6 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 8 Jul 2015 12:57:41 +0000 Subject: [PATCH] - dnsbl.c:dnsbl_positive(): fixed weird logic that could result in 'text_type' being appended with two commas which later would defeat the purpose of *(strrchr(text_type, ',')) = '\0' git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@6232 82007160-df01-0410-b94d-b575c5fd34c7 --- src/dnsbl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dnsbl.c b/src/dnsbl.c index f8ea9a4..d73cd4f 100644 --- a/src/dnsbl.c +++ b/src/dnsbl.c @@ -111,11 +111,8 @@ dnsbl_positive(struct scan_struct *ss, struct BlacklistConf *bl, unsigned char t if (item->number & type) { - strncat(text_type, item->type, sizeof(text_type) - strlen(text_type) - 2); - text_type[sizeof(text_type) - 2] = '\0'; - - strncat(text_type, ", ", sizeof(text_type) - strlen(text_type) - 1); - text_type[sizeof(text_type) - 1] = '\0'; + strlcat(text_type, item->type, sizeof(text_type)); + strlcat(text_type, ", ", sizeof(text_type)); } } -- 2.30.2