diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-15 17:04:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-15 17:04:25 +0000 |
commit | 747ae55cb67a3951a19d4ed7ea13f9efc4ce74ce (patch) | |
tree | 7de77ec9d28ae8b27bab0043a19f5430f82605b8 /src/libserver/html.c | |
parent | f5955b8d3e46fef5065a395ce3f7dade267fba1f (diff) | |
download | rspamd-747ae55cb67a3951a19d4ed7ea13f9efc4ce74ce.tar.gz rspamd-747ae55cb67a3951a19d4ed7ea13f9efc4ce74ce.zip |
[Fix] Do not check empty html components
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r-- | src/libserver/html.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index a910520c5..b799e9280 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1297,7 +1297,7 @@ rspamd_html_process_img_tag (rspamd_mempool_t *pool, struct html_tag *tag, } else if (comp->type == RSPAMD_HTML_COMPONENT_STYLE) { /* Try to search for height= or width= in style tag */ - if (!seen_height) { + if (!seen_height && comp->len > 0) { p = rspamd_strncasestr (comp->start, "height", comp->len); if (p != NULL) { @@ -1318,7 +1318,7 @@ rspamd_html_process_img_tag (rspamd_mempool_t *pool, struct html_tag *tag, } } - if (!seen_width) { + if (!seen_width && comp->len > 0) { p = rspamd_strncasestr (comp->start, "width", comp->len); if (p != NULL) { |