aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/html.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-07 22:52:55 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-07 22:52:55 +0100
commit2e5dae850516f923cda3b26492c697a676aa3cdc (patch)
tree9e1c685d5a0f3c3eb89c363e9a6d190cc1c6dc53 /src/libserver/html.c
parent6691508e4221b4efd89653f0a8ee49996446904e (diff)
downloadrspamd-2e5dae850516f923cda3b26492c697a676aa3cdc.tar.gz
rspamd-2e5dae850516f923cda3b26492c697a676aa3cdc.zip
[Minor] More bounds checks
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r--src/libserver/html.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index 175398aa3..00b4e24a5 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -848,8 +848,9 @@ rspamd_html_url_is_phished (rspamd_mempool_t *pool,
url_text ++;
}
- if (rspamd_url_find (pool, url_text, end - url_text, &url_str, FALSE,
- &url_pos) &&
+ if (end > url_text + 4 &&
+ rspamd_url_find (pool, url_text, end - url_text, &url_str, FALSE,
+ &url_pos) &&
url_str != NULL) {
if (url_pos > 0) {
/*