]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
json-email-common: fix email extended logging
authorEric Leblond <eric@regit.org>
Wed, 14 Oct 2015 12:17:19 +0000 (14:17 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 20 Oct 2015 17:11:15 +0000 (19:11 +0200)
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

index 05755069690ceb4adb6a527f36bffd6e2be2f81d..33264d471d610240ef4589af4f5ac4be57430c02 100644 (file)
@@ -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;