]> source.dussan.org Git - rspamd.git/commitdiff
* If tag attribute value empty do not assume it as url
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 3 Jul 2009 15:51:05 +0000 (19:51 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 3 Jul 2009 15:51:05 +0000 (19:51 +0400)
src/html.c

index 4fa81be0b3e5aa1b8da183fd6057204a9e02e084..337bbff4e063f01e676ef64dc2814d3b64c82c67 100644 (file)
@@ -325,6 +325,10 @@ parse_tag_url (struct worker_task *task, struct mime_text_part *part, tag_id_t i
                        c++;
                }
 
+               if (len == 0) {
+                       return;
+               }
+
                url_text = memory_pool_alloc (task->task_pool, len + 1);
                g_strlcpy (url_text, c, len + 1);
                url = memory_pool_alloc (task->task_pool, sizeof (struct uri));