diff --git a/src/conf-yaml-loader.c b/src/conf-yaml-loader.c index bbc3c9f889..57b793aa69 100644 --- a/src/conf-yaml-loader.c +++ b/src/conf-yaml-loader.c @@ -379,6 +379,11 @@ static int ConfYamlParse(yaml_parser_t *parser, ConfNode *parent, int inseq, int } else if (event.type == YAML_MAPPING_START_EVENT) { SCLogDebug("event.type=YAML_MAPPING_START_EVENT; state=%d", state); + if (state == CONF_INCLUDE) { + SCLogError("Include fields cannot be a mapping: line %zu", parser->mark.line); + retval = -1; + goto fail; + } if (inseq) { char sequence_node_name[DEFAULT_NAME_LEN]; snprintf(sequence_node_name, DEFAULT_NAME_LEN, "%d", seq_idx++);