]> source.dussan.org Git - rspamd.git/commitdiff
Fix another critical composites issue and memory corruption.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Jan 2015 01:11:02 +0000 (01:11 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Jan 2015 01:11:32 +0000 (01:11 +0000)
src/libserver/cfg_rcl.c

index 13ef400ed62e3e94bc9d24d6a442ebb1f32dfb5f..09e882709454da1a35c57f6f82efc7c70bc3c714 100644 (file)
@@ -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);