frameworks_bluetooth/framework/common
v-chenghuijin a91f2a311c fix: prevent crash by ensuring non-null string for sched_note_printf
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>
2026-01-26 23:46:10 +08:00
..
advertiser_data.c bluetooth: Fix the issue of incorrect length when adding service data to broadcast data. 2025-08-08 13:52:12 +08:00
advertiser_data_helper.c scan: Replace lib_dumpbuffer with BT_DUMPBUFFER. 2025-11-13 11:35:55 +08:00
bt_addr.c addr: fix bt_addr_str multiple define 2025-01-16 20:16:25 +08:00
bt_hash.c Merge commit 2024-11-25 17:34:53 +08:00
bt_hash.h Move the internal header files out to include common 2025-10-24 01:29:42 +08:00
bt_internal.h Move the internal header files out to include common 2025-10-24 01:29:42 +08:00
bt_list.c Merge commit 2024-11-25 17:34:53 +08:00
bt_time.c Rename helper func get_os_timestamp_xx to bt_get_os_timestamp_xx avoid 2025-06-19 21:19:12 +08:00
bt_trace.h Move the internal header files out to include common 2025-10-24 01:29:42 +08:00
bt_uuid.c Vela-Android: save bredr remote uuids 2025-02-07 13:55:03 +08:00
callbacks_list.c Merge commit 2024-11-25 17:34:53 +08:00
euv_pipe.c Bluetooth: Fixed an issue where resources could not be released after closing uv_pipe in euv_pipe. 2026-01-26 10:03:18 +08:00
euv_pty.c Merge commit 2024-11-25 17:34:53 +08:00
state_machine.c fix: prevent crash by ensuring non-null string for sched_note_printf 2026-01-26 23:46:10 +08:00
uv_thread_loop.c Revert "Bluetooth: Prevent crash when calling uv_run after event loop closure." 2026-01-23 09:22:13 +08:00