From: Philippe Antoine Date: Fri, 11 Jun 2021 12:13:44 +0000 (+0200) Subject: config: fix null dereference in MacSetRegisterFlowStorage X-Git-Tag: suricata-7.0.0-beta1~1585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bf653054025e6297f05ec211a0baa44cf795704;p=thirdparty%2Fsuricata.git config: fix null dereference in MacSetRegisterFlowStorage Crash happens with --set outputs.eve-json.types.files.force-magic=yes --- diff --git a/src/util-macset.c b/src/util-macset.c index 81a40a8c42..56d7539af6 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");