]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
conf/output: friendly error message on bad configuration
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 18 Jul 2025 13:51:37 +0000 (15:51 +0200)
committerJason Ish <jason.ish@oisf.net>
Fri, 1 Aug 2025 16:54:13 +0000 (10:54 -0600)
Ticket: 7611

Instead of segfault

output.types expects a sequence of one-key mappings, instead
of directly a mapping

src/runmodes.c

index 800365f8e5220c67c4274d9fcfcb8e37d1f9a1ac..05c5e925ef7a4c594fe1740fa58e1d7945b7b39a 100644 (file)
@@ -669,6 +669,9 @@ static void RunModeInitializeEveOutput(
     if (types == NULL) {
         return;
     }
+    if (!SCConfNodeIsSequence(types)) {
+        FatalError("output types should be a sequence");
+    }
 
     SCConfNode *type = NULL;
     TAILQ_FOREACH(type, &types->head, next) {