wireless/bt_hcicore: Fix buffer type confusion on missing response.

Fix possible stack corruption on missing command response.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
This commit is contained in:
Chongqing Lei
2025-04-10 20:18:56 +02:00
committed by Xiang Xiao
parent 29da7fc824
commit 08c239dcd1

View File

@@ -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