If a field named "include" is mapping it is not processed correctly.
Instead return a fatal error.
In our YAML, "include" has always been a reserved word, so this should
not break any known configuration.
Ticket: #5939
}
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++);