]> source.dussan.org Git - rspamd.git/commitdiff
Fix removing of elements from the stack.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Mar 2015 18:23:06 +0000 (18:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Mar 2015 18:23:06 +0000 (18:23 +0000)
src/libutil/expression.c

index 41b30010b9c09f20905ae7f7961886ad89b6da94..b7604615e671727344e0be9ff90f2045af544610 100644 (file)
@@ -716,7 +716,7 @@ rspamd_process_expression (struct rspamd_expression *expr, gpointer data)
                                /* If we done, then we go forward and skip remaining items */
                                if (done) {
                                        /* Remove extra elements left on the stack */
-                                       for (j = i; j < cmp_pos; j ++) {
+                                       for (j = i + 1; j < cmp_pos - 1; j ++) {
                                                check = &g_array_index (expr->expressions,
                                                                struct rspamd_expression_elt, j);
                                                if (check->type == ELT_OP && check->p.op == OP_PLUS) {