From 38c21077e63e0212ed0e95936a9843fbcdeb7a70 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Wed, 14 Oct 2015 14:17:19 +0200 Subject: [PATCH] json-email-common: fix email extended logging Two structure fields were uninitialized and used has a bit field. Weird behavior were seen in list of logged fields due to that with some build options. --- src/output-json-email-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/output-json-email-common.c b/src/output-json-email-common.c index 0575506969..33264d471d 100644 --- a/src/output-json-email-common.c +++ b/src/output-json-email-common.c @@ -412,6 +412,7 @@ void OutputEmailInitConf(ConfNode *conf, OutputJsonEmailCtx *email_ctx) } } + email_ctx->fields = 0; ConfNode *custom; if ((custom = ConfNodeLookupChild(conf, "custom")) != NULL) { ConfNode *field; @@ -433,6 +434,7 @@ void OutputEmailInitConf(ConfNode *conf, OutputJsonEmailCtx *email_ctx) } } + email_ctx->flags = 0; ConfNode *md5_conf; if ((md5_conf = ConfNodeLookupChild(conf, "md5")) != NULL) { ConfNode *field;