]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Performance critical fix 0.3.3
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 3 Nov 2010 14:32:12 +0000 (17:32 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 3 Nov 2010 14:32:12 +0000 (17:32 +0300)
src/url.c

index 3b96c083e91ae01f23dda86af3a7006f309a500a..3edc0a7b13bf86cc471d6de2c1d12869448fc036 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1220,7 +1220,7 @@ url_try_text (memory_pool_t *pool, const gchar *begin, gsize len, gint *res, gch
                                *url_str = NULL;
                        }
                        if (res) {
-                               *res = strlen (matcher->pattern);
+                               *res = (pos - begin) + strlen (matcher->pattern);
                        }
                        return TRUE;
                }