diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-19 17:01:17 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-19 17:01:17 +0400 |
commit | fd4de5a9277d8d4a75b2258b4e1f8cf20c8e0e1d (patch) | |
tree | 7a8ea53e842e815f6add4b2abf267ffcc0c4d549 /src/url.c | |
parent | 6a2422fe75904e8072bdf48502d0245f89e1a0e2 (diff) | |
download | rspamd-fd4de5a9277d8d4a75b2258b4e1f8cf20c8e0e1d.tar.gz rspamd-fd4de5a9277d8d4a75b2258b4e1f8cf20c8e0e1d.zip |
Fix coredumps on some specific messages with specific urls.
Fix coredumps while closing log file.
Fix parsing of chunked HTTP replies.
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1252,17 +1252,23 @@ url_try_text (memory_pool_t *pool, const gchar *begin, gsize len, gchar **start, memcpy (*url_str, m.m_begin, m.m_len); (*url_str)[m.m_len] = '\0'; } - + if (start != NULL) { + *start = (gchar *)m.m_begin; + } + if (fin != NULL) { + *fin = (gchar *)m.m_begin + m.m_len; + } } else { *url_str = NULL; + if (start != NULL) { + *start = (gchar *)pos; + } + if (fin != NULL) { + *fin = (gchar *)pos + strlen (m.prefix); + } } - if (start != NULL) { - *start = (gchar *)m.m_begin; - } - if (fin != NULL) { - *fin = (gchar *)m.m_begin + m.m_len; - } + return TRUE; } } |