mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-07 14:15:13 +00:00
When a command has no arguments (e.g., 'q', 'quit', 'stop'), the strtok_r() function returns NULL for the arg parameter. The argument trimming loop was dereferencing this NULL pointer without checking, causing undefined behavior and system hang on ESP32-S3. This commit adds a null check before dereferencing the arg pointer in the leading space trimming loop. Tested on ESP32-S3 (lckfb-szpi-esp32s3) - quit command now works correctly. Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| Makefile | ||
| nxrecorder.c | ||
| nxrecorder_amr.c | ||
| nxrecorder_common.c | ||
| nxrecorder_main.c | ||