From: Jason Ish Date: Mon, 4 Mar 2024 21:59:09 +0000 (-0600) Subject: smtp: fix configuration node creation X-Git-Tag: suricata-8.0.0-beta1~1590 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e38ec7d0a7b71650f3b2cfb543a21b671daacaca;p=thirdparty%2Fsuricata.git 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. --- 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.");