nuttx-apps/system
wangjianyu3 6a1b2c6903 system/nxrecorder: Fix null pointer dereference in argument parsing
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>
2026-03-26 10:42:48 +01:00
..
adb adb: adb tcp server configuration depends on NET_TCPBACKLOG 2025-12-11 19:16:23 +08:00
adcscope add system/adcscope - streaming tool for ADC 2025-06-17 14:29:08 -03:00
argtable3 cmake: remove empty strings from FetchContent 2025-03-30 14:20:21 +08:00
batterydump system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
cdcacm system/cdcacm: Support sercon and serdis in CONFIG_BUILD_KERNEL 2025-09-17 12:38:05 +02:00
cfgdata mtd/nvs: modify config name to MTD_CONFIG_NVS part1 2026-02-02 11:01:19 +08:00
cle nsh: return EOF when nread is 0 2025-12-10 11:24:14 +08:00
composite apps/system/composite: change cmake build name to conn and disconn 2025-12-10 11:24:35 +08:00
conntrack system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
coredump system/coredump: Fix missing loglevel to logmask conversion. 2025-07-09 09:54:40 +02:00
cpuload system/cpuload: Fix application's Make.defs location 2025-02-20 08:34:52 +01:00
critmon system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
cu system/cu: merge the cu.h to cu_main.c 2026-01-20 10:23:34 +01:00
dd apps: Fix minor issues for latest toolchains 2026-01-23 10:00:52 +08:00
debugpoint system/debugpoint: fix bug the length option parsing error 2025-02-25 13:07:58 -03:00
dhcp6c system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
dhcpc system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
dumpstack system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
fastboot system/fastboot: fix socket() parameter order for TCP transport 2026-03-23 08:46:18 -03:00
fdt system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
flash_eraseall system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
flatbuffers system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
gcov gcov: Output mode judgment is implemented in the kernel layer 2025-06-26 23:48:01 +08:00
gdbstub system/gdbstub: Add depends of LIB_GDBSTUB 2025-07-18 22:42:03 +08:00
gprof system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
hex2bin system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
hexed system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
hostname system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
i2c system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
iptables iptables: add file lock to prevent concurrent overwrite 2026-01-15 17:20:03 +08:00
irtest system/irtest/Make.defs: fixed the wrong path 2025-02-22 13:27:25 +08:00
libuv libuv: fix sendmsg parameter type in NuttX port 2026-01-16 21:10:55 +08:00
lm75 system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
lsan testing: add missing header files 2026-01-26 19:32:27 +08:00
lzf system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
mdio system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
netdb system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nsh system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
ntpc system/ntpc: update ntpc messages 2025-09-05 23:47:36 +02:00
nxcamera system: unify Private Types banners 2025-05-28 10:16:50 +08:00
nxcodec system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
nxdiag apps/nxdiag: Update nxdiag app due to script place changes 2025-01-07 23:41:42 +08:00
nxlooper system: unify Private Types banners 2025-05-28 10:16:50 +08:00
nxplayer system: unify Private Types banners 2025-05-28 10:16:50 +08:00
nxrecorder system/nxrecorder: Fix null pointer dereference in argument parsing 2026-03-26 10:42:48 +01:00
ofloader system: unify Private Types banners 2025-05-28 10:16:50 +08:00
ping net/ping: utils ping should depends on ipv4 2025-12-25 12:24:30 +08:00
ping6 ping: add -I for bind device 2025-12-25 12:24:04 +08:00
popen system/popen: close newfd correctly 2026-01-22 19:54:56 +08:00
psmq system/psmq: add proper include path for embedlog 2025-02-20 08:39:13 +01:00
ptpd netutils/ptpd: using -B to control BMCA message 2025-12-30 08:51:51 -03:00
readline system: unify Private Types banners 2025-05-28 10:16:50 +08:00
resmonitor system: unify Private Types banners 2025-05-28 10:16:50 +08:00
sched_note system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
sensorscope system/sensorscope: fix compilation 2026-03-23 11:00:44 +01:00
sensortest signals: fix build and runtime issues when signals all isabled 2026-01-19 22:55:19 +08:00
setlogmask system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
settings system/settings: Add spaces after each switch 'case' 2025-06-26 13:22:47 -03:00
smf system/smf: Port SMF .c/.h files to NuttX 2026-01-05 12:50:04 -05:00
spi apps/spitool: Support multiple trans 2025-12-10 11:26:43 +08:00
stackmonitor system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
syslogd system/syslogd: Initial implementation 2025-06-17 20:43:58 +08:00
system system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
taskset apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX 2025-01-14 19:31:54 +08:00
tcpdump pkt: Set sll_protocol for raw socket to ETH_P_ALL 2026-01-04 21:41:21 +08:00
tee style: Fix coding style violations in nuttx-apps 2026-01-12 00:54:48 +08:00
telnet system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
telnetd system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
termcurses system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
trace apps/system/trace: support binary dump of noteram 2026-01-26 19:32:42 +08:00
ubloxmodem system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
uniqueid system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
uorb system/uorb: uorb_listener add new features. 2026-01-26 19:31:45 +08:00
usbmsc system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
vi Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
ymodem apps/system/ymodem: Optimized ymodem for burn during bootloader 2026-02-02 11:00:19 +08:00
zlib apps: Fix minor issues for latest toolchains 2026-01-23 10:00:52 +08:00
zmodem libs/libc/crc16: Separate implementation of crc16xmodem from crc16 2025-04-10 22:38:48 +08:00
.gitignore Remove extra whitespace from files (#43) 2020-01-31 08:29:24 -06:00
CMakeLists.txt system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Make.defs system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00