This is an automated email from the ASF dual-hosted git repository. lupyuen pushed a commit to branch releases/12.9 in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6442c042a3a8bfcac803d8b949234ad674c664e7 Author: Chongqing Lei <le...@seu.edu.cn> AuthorDate: Thu Apr 10 20:18:56 2025 +0200 wireless/bt_hcicore: Fix buffer type confusion on missing response. Fix possible stack corruption on missing command response. Signed-off-by: Tomasz 'CeDeROM' CEDRO <to...@cedro.info> --- wireless/bluetooth/bt_hcicore.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c index 79c2c446fd..a993073d82 100644 --- a/wireless/bluetooth/bt_hcicore.c +++ b/wireless/bluetooth/bt_hcicore.c @@ -2017,6 +2017,12 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf, ret = 0; } } + else + { + wlerr("ERROR: Failed get response\n"); + nxsem_destroy(&sync_sem); + return -EIO; + } /* Note: if ret < 0 the packet might just be delayed and could still * be sent. We cannot decrease the ref count since it if it was sent