diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-11-03 17:21:12 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-11-03 17:21:12 +0300 |
commit | e3d3e31606aa9a6635af0434797fc2fe842a6a6a (patch) | |
tree | 7965e393f965f85bdc79a87817826369714ad85b /src/url.c | |
parent | 1c7458522170627a9988a3472c1f7d19612d5feb (diff) | |
download | rspamd-e3d3e31606aa9a6635af0434797fc2fe842a6a6a.tar.gz rspamd-e3d3e31606aa9a6635af0434797fc2fe842a6a6a.zip |
Urgent fixes.
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1169,7 +1169,8 @@ url_parse_text (memory_pool_t * pool, struct worker_task *task, struct mime_text } while (p < end) { if (url_try_text (pool, p, end - p, &off, &url_str)) { - if (g_tree_lookup (is_html ? part->html_urls : part->urls, url_str) == NULL) { + if (url_str != NULL && + g_tree_lookup (is_html ? part->html_urls : part->urls, url_str) == NULL) { new = memory_pool_alloc0 (pool, sizeof (struct uri)); if (new != NULL) { g_strstrip (url_str); @@ -1215,6 +1216,9 @@ url_try_text (memory_pool_t *pool, const gchar *begin, gsize len, gint *res, gch (*url_str)[m.m_len] = '\0'; } + else { + *url_str = NULL; + } if (res) { *res = strlen (matcher->pattern); } |