From: Vsevolod Stakhov Date: Wed, 25 Mar 2015 18:23:06 +0000 (+0000) Subject: Fix removing of elements from the stack. X-Git-Tag: 0.9.0~425 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=24a64389974df532beab7cb48e4280cde2c87cc0;p=rspamd.git Fix removing of elements from the stack. --- diff --git a/src/libutil/expression.c b/src/libutil/expression.c index 41b30010b..b7604615e 100644 --- a/src/libutil/expression.c +++ b/src/libutil/expression.c @@ -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) {