summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 18:55:44 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 18:55:44 +0300
commit7487d02f1b3224a913e66d9940adcdaf9c966e7d (patch)
tree9a938f35588568fe5aa049df96e0a8bf37530712 /src/message.c
parentc494636eedee963c4789fc7b8a0cd7d9acc80e18 (diff)
downloadrspamd-7487d02f1b3224a913e66d9940adcdaf9c966e7d.tar.gz
rspamd-7487d02f1b3224a913e66d9940adcdaf9c966e7d.zip
Make phishing checks working.
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c
index 78094b32b..b4ddde839 100644
--- a/src/message.c
+++ b/src/message.c
@@ -37,7 +37,7 @@
GByteArray *
strip_html_tags (struct worker_task *task, memory_pool_t * pool, struct mime_text_part *part, GByteArray * src, gint *stateptr)
{
- uint8_t *tbuf = NULL, *p, *tp = NULL, *rp, *tbegin = NULL, c, lc;
+ uint8_t *tbuf = NULL, *p, *tp = NULL, *rp, *tbegin = NULL, *end, c, lc;
gint br, i = 0, depth = 0, in_q = 0;
gint state = 0;
GByteArray *buf;
@@ -54,6 +54,7 @@ strip_html_tags (struct worker_task *task, memory_pool_t * pool, struct mime_tex
lc = '\0';
p = src->data;
rp = buf->data;
+ end = src->data + src->len;
br = 0;
while (i < src->len) {
@@ -112,7 +113,7 @@ strip_html_tags (struct worker_task *task, memory_pool_t * pool, struct mime_tex
case 1: /* HTML/XML */
lc = '>';
in_q = state = 0;
- erase = !add_html_node (task, pool, part, tbegin, p - tbegin, &level_ptr);
+ erase = !add_html_node (task, pool, part, tbegin, p - tbegin, end - tbegin, &level_ptr);
break;
case 2: /* PHP */