From: Vsevolod Stakhov Date: Mon, 18 Feb 2019 21:00:18 +0000 (+0000) Subject: [Minor] Fix multipattern escaping for TLDs X-Git-Tag: 1.9.0~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2645a9a8ee9d7521658bd04ac7564da63026cd4;p=thirdparty%2Frspamd.git [Minor] Fix multipattern escaping for TLDs --- diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index c1d0d6499b..2681705124 100644 --- a/src/libutil/multipattern.c +++ b/src/libutil/multipattern.c @@ -99,8 +99,8 @@ rspamd_multipattern_escape_tld_hyperscan (const gchar *pattern, gsize slen, /* * We understand the following cases - * 1) blah -> \\.blah - * 2) *.blah -> \\..*\\.blah + * 1) blah -> .blah + * 2) *.blah -> ..*\\.blah * 3) ??? */ @@ -116,10 +116,10 @@ rspamd_multipattern_escape_tld_hyperscan (const gchar *pattern, gsize slen, p ++; } - prefix = ".*"; + prefix = ".*."; } else { - len = slen + 2; + len = slen + 1; prefix = "."; p = pattern; }