mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-21 17:24:33 +08:00
rt_smem_setname() dereferenced name[index] without checking for NULL first. Some callers legitimately pass an unnamed allocation through with a NULL name, which crashed instead of just leaving the trace field blank. Treat a NULL name the same as an empty string, so the existing fill-with-spaces loop below handles it without duplicating that logic. Fixes #9793 Signed-off-by: yi chen <94xhn1@gmail.com>