From: Vsevolod Stakhov Date: Thu, 14 Jul 2011 15:47:56 +0000 (+0400) Subject: Fix coredump on messages with one url only. X-Git-Tag: 0.4.0~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb37f21a76f9e30e06bf1c80b2b20d05820a9f93;p=rspamd.git Fix coredump on messages with one url only. --- diff --git a/src/fuzzy.c b/src/fuzzy.c index 2639d68a7..21ac1eef9 100644 --- a/src/fuzzy.c +++ b/src/fuzzy.c @@ -371,7 +371,7 @@ fuzzy_init_part (struct mime_text_part *part, memory_pool_t *pool, gsize max_dif } } - write_diff = real_len < max_diff; + write_diff = real_len > 0 && real_len < max_diff; if (write_diff) { part->diff_str = fstralloc (pool, real_len);