From: Philippe Antoine Date: Fri, 11 Jun 2021 12:13:44 +0000 (+0200) Subject: config: fix null dereference in MacSetRegisterFlowStorage X-Git-Tag: suricata-6.0.3~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6212%2Fhead;p=thirdparty%2Fsuricata.git config: fix null dereference in MacSetRegisterFlowStorage Crash happens with --set outputs.eve-json.types.files.force-magic=yes (cherry picked from commit 8bf653054025e6297f05ec211a0baa44cf795704) --- diff --git a/src/util-macset.c b/src/util-macset.c index 30e6c6b343..fbffd6ce5c 100644 --- a/src/util-macset.c +++ b/src/util-macset.c @@ -66,7 +66,7 @@ void MacSetRegisterFlowStorage(void) has the ethernet setting enabled */ if (root != NULL) { TAILQ_FOREACH(node, &root->head, next) { - if (strcmp(node->val, "eve-log") == 0) { + if (node->val && strcmp(node->val, "eve-log") == 0) { const char *enabled = ConfNodeLookupChildValue(node->head.tqh_first, "enabled"); if (enabled != NULL && ConfValIsTrue(enabled)) { const char *ethernet = ConfNodeLookupChildValue(node->head.tqh_first, "ethernet");