From: michael Date: Wed, 8 Jul 2015 12:57:57 +0000 (+0000) Subject: - dnsbl.c:dnsbl_positive(): fixed weird logic that could result in 'text_type' being... X-Git-Tag: 1.1.0~26 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=d4b15050aba5d602f76559e713ccfa9d1071330a;p=hopm.git - 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/branches/1.1.x@6233 82007160-df01-0410-b94d-b575c5fd34c7 --- 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)); } }