From: Vsevolod Stakhov Date: Fri, 10 Nov 2017 18:51:57 +0000 (+0000) Subject: [Minor] Fix off-boundary access X-Git-Tag: 1.7.0~455 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b1cf85652664b562a70060fc30e62b90823daee;p=thirdparty%2Frspamd.git [Minor] Fix off-boundary access --- diff --git a/src/libserver/html.c b/src/libserver/html.c index 42b2447e0b..8ff6b6fad7 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -2076,6 +2076,11 @@ rspamd_html_check_displayed_url (rspamd_mempool_t *pool, gboolean url_found = FALSE; struct rspamd_process_exception *ex; + if (href_offset <= 0) { + /* No dispalyed url, just some text within tag */ + return; + } + rspamd_html_url_is_phished (pool, url, dest->data + href_offset, dest->len - href_offset,