]> source.dussan.org Git - rspamd.git/commitdiff
Fix rspamd_parts_distance function.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Mar 2015 14:02:41 +0000 (14:02 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Mar 2015 14:02:41 +0000 (14:02 +0000)
src/libmime/mime_expressions.c

index 01e3ddeb2d27b4ed9e9858a976602bd07a4991e1..2e8fdeedc9d36ebd183c7d72f1728d2890ca1270 100644 (file)
@@ -1135,7 +1135,7 @@ rspamd_parts_distance (struct rspamd_task * task, GArray * args, void *unused)
                                (gchar *)arg->data);
                        threshold = 100;
                }
-               if (args->len == 1) {
+               if (args->len >= 2) {
                        arg = &g_array_index (args, struct expression_argument, 1);
                        if (!arg || arg->type != EXPRESSION_ARGUMENT_NORMAL) {
                                msg_warn ("invalid argument to function is passed");