From: Vsevolod Stakhov Date: Thu, 22 Jan 2015 01:11:02 +0000 (+0000) Subject: Fix another critical composites issue and memory corruption. X-Git-Tag: 0.8.1~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a3a0afbf39fbeb2fae08573c426db631aa9dddbe;p=rspamd.git Fix another critical composites issue and memory corruption. --- diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 13ef400ed..09e882709 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1102,7 +1102,7 @@ rspamd_rcl_composite_handler (struct rspamd_config *cfg, composite = rspamd_mempool_alloc (cfg->cfg_pool, sizeof (struct rspamd_composite)); composite->expr = expr; - composite->id = g_hash_table_size (cfg->composite_symbols) + 1; + composite->id = g_hash_table_size (cfg->composite_symbols); g_hash_table_insert (cfg->composite_symbols, (gpointer)composite_name, composite);