bug: v/84212 Rootcase: The lightweight sched_note_printf function in the NuttX backend does not perform NULL safety checks for the %s format specifier. Passing a NULL pointer from hsm_get_state_name leads to a NULL pointer dereference, triggering a data abort exception on systems with memory protection (MMU/MPU) and causing a system crash. Solution: This commit addresses the issue by modifying the HSM_SAFE_NAME macro to use the ternary operator. It now explicitly returns the "None" string literal when hsm_get_state_name returns NULL, guaranteeing that a valid, non-null C-string is always passed to the logging function. Signed-off-by: v-chenghuijin <v-chenghuijin@xiaomi.com> |
||
|---|---|---|
| .. | ||
| advertiser_data.c | ||
| advertiser_data_helper.c | ||
| bt_addr.c | ||
| bt_hash.c | ||
| bt_hash.h | ||
| bt_internal.h | ||
| bt_list.c | ||
| bt_time.c | ||
| bt_trace.h | ||
| bt_uuid.c | ||
| callbacks_list.c | ||
| euv_pipe.c | ||
| euv_pty.c | ||
| state_machine.c | ||
| uv_thread_loop.c | ||