]> source.dussan.org Git - rspamd.git/commitdiff
Fix coredump on messages with one url only.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 Jul 2011 15:47:56 +0000 (19:47 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 14 Jul 2011 15:47:56 +0000 (19:47 +0400)
src/fuzzy.c

index 2639d68a773d7ae6441bff596b92a0dd23c4914f..21ac1eef9384e829a16b723fe84dcc4a746898d9 100644 (file)
@@ -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);