From e38ec7d0a7b71650f3b2cfb543a21b671daacaca Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 4 Mar 2024 15:59:09 -0600 Subject: [PATCH] smtp: fix configuration node creation A configuration sequence node needs to have name, which is just its index in the sequence. Discovered by calling ConfDump() after Suricata was fully initialized. --- src/app-layer-smtp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index c61421cf01..469ea4740a 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -353,6 +353,10 @@ static void SMTPConfigure(void) { if (unlikely(seq_node->name == NULL)) { FatalError("SCStrdup failure."); } + scheme->name = SCStrdup("0"); + if (unlikely(scheme->name == NULL)) { + FatalError("SCStrdup failure."); + } scheme->val = SCStrdup("http://"); if (unlikely(scheme->val == NULL)) { FatalError("SCStrdup failure.");