]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Add guard when searching for email urls
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 9 Mar 2016 15:56:34 +0000 (15:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 9 Mar 2016 15:56:34 +0000 (15:56 +0000)
src/libserver/url.c

index 76306d9befd751af12a58ab7ea34c972bc2dc05f..4d0969a9795440df7d3c1451bfcdedcf3d644897 100644 (file)
@@ -1911,7 +1911,7 @@ url_email_end (struct url_callback_data *cb,
                        p --;
                }
 
-               if (g_ascii_isalnum (*p)) {
+               if (p < cb->end && g_ascii_isalnum (*p)) {
                        p ++;
                }