From 8bf653054025e6297f05ec211a0baa44cf795704 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 11 Jun 2021 14:13:44 +0200 Subject: [PATCH] config: fix null dereference in MacSetRegisterFlowStorage Crash happens with --set outputs.eve-json.types.files.force-magic=yes --- src/util-macset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.47.2