nuttx-apps/examples/lp503x
Old-Ding 0566af556a examples: lp503x: Fix command argument handling
The lp503x shell command handlers receive the remaining input string as their argument. Treat empty colour arguments as the query case, document that query form in help text, and keep colour and brightness values signed until the existing range checks have run so invalid values are not silently truncated.

Guard the readline_stream() result before using it as a buffer index. readline_stream() returns EOF on end of file or failure, and writing buffer[len] before checking len can write before the stack buffer.

Use MAX_BRIGHTNESS consistently for brightness range checks.

Signed-off-by: Old-Ding <ai.neo.ae86@gmail.com>
2026-07-09 09:41:15 +08:00
..
CMakeLists.txt examples: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Kconfig examples: Add depends on 2025-01-03 21:28:20 +08:00
lp503x_main.c examples: lp503x: Fix command argument handling 2026-07-09 09:41:15 +08:00
Make.defs examples: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile examples: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00