aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-06 15:11:00 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-06 15:11:00 +0000
commitbc39385c418ed05a81da7d09dcbd4f0b8ee3e387 (patch)
tree6d4c7ddc8436934d40bd1650662633b957ad7b34 /src/libserver/cfg_utils.c
parent5e325a59787bdc2fbc306b2ded453c855c3fd6dd (diff)
downloadrspamd-bc39385c418ed05a81da7d09dcbd4f0b8ee3e387.tar.gz
rspamd-bc39385c418ed05a81da7d09dcbd4f0b8ee3e387.zip
Properly copy variable content
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r--src/libserver/cfg_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index e0b79005f..a96f39e5f 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -180,7 +180,7 @@ rspamd_config_defaults (struct rspamd_config *cfg)
/* Default log line */
cfg->log_format_str = "id: <$mid>,$if_qid{ qid: <$>,}$if_ip{ ip: $,}"
- "$if_smtp_from{ from: <$>,} (default: $is_spam "
+ "$if_user{ user: $,}$if_smtp_from{ from: <$>,} (default: $is_spam "
"($action): [$scores] [$symbols]), len: $len, time: $time_real real,"
" $time_virtual virtual, dns req: $dns_req";
}
@@ -361,8 +361,8 @@ rspamd_config_process_var (struct rspamd_config *cfg, const rspamd_ftok_t *var,
if (content && content->len > 0) {
lf->data = rspamd_mempool_alloc0 (cfg->cfg_pool,
sizeof (rspamd_ftok_t));
- memcpy (lf->data, &tok, sizeof (tok));
- lf->len = sizeof (tok);
+ memcpy (lf->data, content, sizeof (*content));
+ lf->len = sizeof (*content);
}
}
else {