aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-22 12:54:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-22 12:54:10 +0100
commit8c8b9656c13dcac6b8cb0887a4b884930efbd2cc (patch)
tree93098f119ea71c7d960bec7ee307205715787e35 /src
parent2779085c6126b86ea770c5a9c6c0b8c06da55bd8 (diff)
downloadrspamd-8c8b9656c13dcac6b8cb0887a4b884930efbd2cc.tar.gz
rspamd-8c8b9656c13dcac6b8cb0887a4b884930efbd2cc.zip
[Fix] Fix nested composites process
Diffstat (limited to 'src')
-rw-r--r--src/libserver/composites.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/composites.c b/src/libserver/composites.c
index f3dc7a956..f0a079b7b 100644
--- a/src/libserver/composites.c
+++ b/src/libserver/composites.c
@@ -130,12 +130,17 @@ rspamd_composite_process_single_symbol (struct composites_data *cd,
sym, cd->composite->sym);
if (isclr (cd->checked, ncomp->id * 2)) {
+ struct rspamd_composite *saved;
+
msg_debug_composites ("composite dependency %s for %s is not checked",
sym, cd->composite->sym);
/* Set checked for this symbol to avoid cyclic references */
setbit (cd->checked, cd->composite->id * 2);
+ saved = cd->composite;
+ cd->composite = ncomp;
rc = rspamd_process_expression (ncomp->expr,
RSPAMD_EXPRESSION_FLAG_NOOPT, cd);
+ cd->composite = saved;
clrbit (cd->checked, cd->composite->id * 2);
if (rc != 0) {