diff options
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -859,6 +859,11 @@ url_parse_text (struct worker_task *task, GByteArray *content) int rc; char *url_str = NULL; struct uri *new; + + if (!content->data || content->len == 0) { + msg_warn ("url_parse_text: got empty text part"); + return; + } if (url_init () == 0) { do { @@ -905,6 +910,11 @@ url_parse_html (struct worker_task *task, GByteArray *content) char *url_str = NULL; struct uri *new; + if (!content->data || content->len == 0) { + msg_warn ("url_parse_text: got empty text part"); + return; + } + if (url_init () == 0) { do { rc = g_regex_match_full (html_re, (const char *)content->data, content->len, pos, 0, &info, &err); |