From: Vsevolod Stakhov Date: Mon, 17 Jun 2013 15:17:24 +0000 (+0100) Subject: Another fix for tld urls. X-Git-Tag: 0.6.0~286 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f6b0289aeddee5f79c343749b89f728ae75b906;p=thirdparty%2Frspamd.git Another fix for tld urls. --- diff --git a/src/url.c b/src/url.c index 9ddce38dd9..eb03198d7d 100644 --- a/src/url.c +++ b/src/url.c @@ -1230,11 +1230,11 @@ url_tld_end (const gchar *begin, const gchar *end, const gchar *pos, url_match_t /* A url must be finished by tld, so it must be followed by punctuation or by space character */ p = pos + strlen (match->pattern); - if (p == end || g_ascii_isspace (*(p + 1)) || g_ascii_ispunct (*(p + 1))) { + if (p == end || g_ascii_isspace (*p) || g_ascii_ispunct (*p)) { match->m_len = p - match->m_begin; return TRUE; } - else if (*(p + 1) == '/' || *(p + 1) == ':') { + else if (*p == '/' || *p == ':') { /* Parse arguments, ports by normal way by url default function */ p = match->m_begin; /* Check common prefix */