wireless/bluetooth/bt_hcicore.c: allocated recv buffer must reserve BLUETOOTH_H4_HDRLEN for head
This was broken since 6c69b12000
.
The first byte in io_data buffer must be the BT H4 packet type.
Without this change an assertion in bt_netdev.c:535 is always raised and nimble host layer crash.
This commit is contained in:
parent
34c7bec0dc
commit
5ac469441e
@ -1622,7 +1622,7 @@ int bt_receive(FAR struct bt_driver_s *btdev, enum bt_buf_type_e type,
|
|||||||
* queue.
|
* queue.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buf = bt_buf_alloc(type, NULL, 0);
|
buf = bt_buf_alloc(type, NULL, BLUETOOTH_H4_HDRLEN);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
{
|
{
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user