diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dkim_check.c | 4 | ||||
-rw-r--r-- | src/plugins/fuzzy_check.c | 3 | ||||
-rw-r--r-- | src/plugins/spf.c | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 69dee2859..28bdbf3c3 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -259,7 +259,9 @@ dkim_module_reconfig (struct rspamd_config *cfg) if (dkim_module_ctx->dkim_domains) { g_hash_table_destroy (dkim_module_ctx->dkim_domains); } - memset (dkim_module_ctx, 0, sizeof (*dkim_module_ctx)); + + memset (dkim_module_ctx + sizeof (dkim_module_ctx->ctx), + 0, sizeof (*dkim_module_ctx) - sizeof (dkim_module_ctx->ctx)); dkim_module_ctx->dkim_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ()); diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 2f7fb2904..61966ccb9 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -499,7 +499,8 @@ fuzzy_check_module_reconfig (struct rspamd_config *cfg) { rspamd_mempool_delete (fuzzy_module_ctx->fuzzy_pool); - memset (fuzzy_module_ctx, 0, sizeof (*fuzzy_module_ctx)); + memset (fuzzy_module_ctx + sizeof (fuzzy_module_ctx->ctx), + 0, sizeof (*fuzzy_module_ctx) - sizeof (fuzzy_module_ctx->ctx)); fuzzy_module_ctx->fuzzy_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ()); fuzzy_module_ctx->cfg = cfg; diff --git a/src/plugins/spf.c b/src/plugins/spf.c index 3c397fb31..c444199ba 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -174,7 +174,8 @@ spf_module_reconfig (struct rspamd_config *cfg) { rspamd_mempool_delete (spf_module_ctx->spf_pool); radix_destroy_compressed (spf_module_ctx->whitelist_ip); - memset (spf_module_ctx, 0, sizeof (*spf_module_ctx)); + memset (spf_module_ctx + sizeof (spf_module_ctx->ctx), + 0, sizeof (*spf_module_ctx) - sizeof (spf_module_ctx->ctx)); spf_module_ctx->spf_pool = rspamd_mempool_new ( rspamd_mempool_suggest_size ()); |