aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:23:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:23:06 +0000
commit24a64389974df532beab7cb48e4280cde2c87cc0 (patch)
treecf5c96fb4c825894c3ed3fc62fc51b48942227a1
parent64d76774195d1c2225f521f6ee1d40a36947bf97 (diff)
downloadrspamd-24a64389974df532beab7cb48e4280cde2c87cc0.tar.gz
rspamd-24a64389974df532beab7cb48e4280cde2c87cc0.zip
Fix removing of elements from the stack.
-rw-r--r--src/libutil/expression.c2
1 files changed, 1 insertions, 1 deletions
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) {