From: Eric Leblond Date: Wed, 14 Oct 2015 12:17:19 +0000 (+0200) Subject: json-email-common: fix email extended logging X-Git-Tag: suricata-3.0RC1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38c21077e63e0212ed0e95936a9843fbcdeb7a70;p=thirdparty%2Fsuricata.git 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. --- 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;