]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
config: check return value of dotted override 8477/head
authorJason Ish <jason.ish@oisf.net>
Fri, 27 Jan 2023 17:40:28 +0000 (11:40 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 27 Jan 2023 17:40:28 +0000 (11:40 -0600)
Fixes commit fbb0d2b0f4ccc873b74ec5db97c08cfa8a9ce251.

src/conf-yaml-loader.c

index ca85f498d80aa0deb6b2ac5b113bb0413d36f5e7..e1dad6ed4dd16e50d5f46bcb7cab70406a8ac727 100644 (file)
@@ -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) {