From e0a1031bccd0723d982076a2ca123cf36d5d2c94 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Wed, 11 Mar 2026 20:22:21 +0800 Subject: [PATCH] system/nxinit: add check loop to init_parse_config_buffer Add the parser[n].check validation loop to init_parse_config_buffer(), matching the same pattern already used in init_parse_config_file(). This ensures that services and actions parsed from in-memory buffers are properly validated after parsing. Signed-off-by: wangjianyu3 --- system/nxinit/parser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/system/nxinit/parser.c b/system/nxinit/parser.c index 4afc5bf61..49193487f 100644 --- a/system/nxinit/parser.c +++ b/system/nxinit/parser.c @@ -139,6 +139,18 @@ static int init_parse_config_buffer(FAR const struct parser_s *parser, } } + for (n = 0; parser[n].key; n++) + { + if (parser[n].check) + { + ret = parser[n].check(&parser[n]); + if (ret < 0) + { + return ret; + } + } + } + return 0; }