From: Vsevolod Stakhov Date: Tue, 21 Apr 2009 18:43:42 +0000 (+0400) Subject: * Thread variables as () expressions to fix problems with operations priority X-Git-Tag: 0.2.7~184 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4528dcf3cfb7ed8ea265bf740757d8813d14f515;p=rspamd.git * Thread variables as () expressions to fix problems with operations priority --- diff --git a/src/cfg_utils.c b/src/cfg_utils.c index fa2bcc918..a68f057ec 100644 --- a/src/cfg_utils.c +++ b/src/cfg_utils.c @@ -382,9 +382,9 @@ substitute_variable (struct config_file *cfg, char *name, char *str, u_char recu new = substitute_variable (cfg, v_begin, var, recursive); } /* Allocate new string */ - new = memory_pool_alloc (cfg->cfg_pool, len - strlen (v_begin) + strlen (var) + 1); + new = memory_pool_alloc (cfg->cfg_pool, len - strlen (v_begin) + strlen (var) + 3); - snprintf (new, len - strlen (v_begin) + strlen (var) + 1, "%s%s%s", + snprintf (new, len - strlen (v_begin) + strlen (var) + 3, "%s(%s)%s", str, var, v_end + 1); str = new; changed = TRUE;