nuttx-apps/system/nxinit
hanzj e86c0b997d system/nxinit: skip empty lines in init.rc parser
Empty lines in init.rc caused parsing to fail with -EINVAL because init_parse_arguments() returns 0 for empty strings, triggering the 'argc < 1' error path in init_action_parse() and accessing uninitialized argv[0] in init_service_parse().

Fix by skipping empty lines and lines containing only whitespace before attempting to match section keywords or calling parser callbacks.

Fixes apache/nuttx-apps#3513

Signed-off-by: hanzj <hanzhijian@zepp.com>
2026-06-04 13:11:09 -03:00
..
action.c system/nxinit: Warning for long commands 2026-05-27 17:20:07 -03:00
action.h system/nxinit: Warning for long commands 2026-05-27 17:20:07 -03:00
builtin.c system/nxinit: Add exec_start support for action 2026-05-27 17:20:07 -03:00
builtin.h system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
CMakeLists.txt system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
import.c system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
import.h system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
init.c apps/nxinit: Fix uninitialized variable 2026-05-28 01:08:11 -03:00
init.h system/nxinit: Change LOG_DEBUG to LOG_USER 2026-05-27 17:20:07 -03:00
Kconfig apps/nxinit: Make init.rc file path configurable 2026-05-28 01:08:11 -03:00
Make.defs system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
Makefile system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
parser.c system/nxinit: skip empty lines in init.rc parser 2026-06-04 13:11:09 -03:00
parser.h system/nxinit: Add NuttX Init 2026-05-27 17:20:07 -03:00
service.c apps/nxinit: Fix service length error 2026-05-28 01:08:11 -03:00
service.h system/nxinit: Let use a define to define the class max cmds 2026-05-27 17:20:07 -03:00