From: Jason Ish Date: Fri, 27 Jan 2023 17:40:28 +0000 (-0600) Subject: config: check return value of dotted override X-Git-Tag: suricata-7.0.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84d1ed58bbebaed61664a44a6cf58b550ea674ee;p=thirdparty%2Fsuricata.git config: check return value of dotted override Fixes commit fbb0d2b0f4ccc873b74ec5db97c08cfa8a9ce251. --- diff --git a/src/conf-yaml-loader.c b/src/conf-yaml-loader.c index ca85f498d8..e1dad6ed4d 100644 --- a/src/conf-yaml-loader.c +++ b/src/conf-yaml-loader.c @@ -304,6 +304,10 @@ ConfYamlParse(yaml_parser_t *parser, ConfNode *parent, int inseq, int rlevel) if (strchr(value, '.') != NULL) { node = ConfNodeGetNodeOrCreate(parent, value, 0); + if (node == NULL) { + /* Error message already logged. */ + goto fail; + } } else { ConfNode *existing = ConfNodeLookupChild(parent, value); if (existing != NULL) {