This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit e0a1031bccd0723d982076a2ca123cf36d5d2c94
Author: wangjianyu3 <[email protected]>
AuthorDate: Wed Mar 11 20:22:21 2026 +0800

    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 <[email protected]>
---
 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;
 }
 

Reply via email to