From 7c0565d918ee1c6aaf36b402ae7a3e63b472355f Mon Sep 17 00:00:00 2001 From: Yadong Zhang Date: Sun, 21 Jun 2026 02:28:31 -0700 Subject: [PATCH] config_format: fix variant array not resizable in YAML parser The variant array in state_push_variant() was created with a fixed size of 10 but not marked as resizable. This causes "unable to add key to list map" errors when parsing YAML configs with more than 10 entries in a list (e.g., rewrite_tag rules or OTel routes). Add cfl_array_resizable(array, CFL_TRUE) to match the same pattern already used in state_push_witharr() in the same file. Signed-off-by: Yadong Zhang --- src/config_format/flb_cf_yaml.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config_format/flb_cf_yaml.c b/src/config_format/flb_cf_yaml.c index f05f2385d20..e7a8412e753 100644 --- a/src/config_format/flb_cf_yaml.c +++ b/src/config_format/flb_cf_yaml.c @@ -2816,6 +2816,8 @@ static struct parser_state *state_push_variant(struct local_ctx *ctx, return NULL; } + cfl_array_resizable(array, CFL_TRUE); + variant = cfl_variant_create_from_array(array); if (variant == NULL) {