mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 21:48:35 +01:00
Bluetooth: fix out of bounds access
Pointed by clang. Change-Id: If8f60619bd98027ae7bc0e7ecaa1c86db6bacf0e Reviewed-on: https://review.haiku-os.org/c/haiku/+/2403 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
39a7a69b07
commit
33378c1413
@ -9,7 +9,7 @@
|
||||
#define BT_DRIVER_SUPPORTS_CMD 1
|
||||
#define BT_DRIVER_SUPPORTS_EVT 1
|
||||
#define BT_DRIVER_SUPPORTS_ACL 1
|
||||
#define BT_DRIVER_SUPPORTS_SCO 0
|
||||
#define BT_DRIVER_SUPPORTS_SCO 1
|
||||
#define BT_DRIVER_SUPPORTS_ESCO 0
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ sched_tx_processing(bt_usb_dev* bdev)
|
||||
err = submit_tx_command(bdev, snbuf);
|
||||
if (err != B_OK) {
|
||||
// re-head it
|
||||
list_insert_item_before(&bdev->nbuffersTx[BT_COMMAND],
|
||||
list_insert_item_before(&bdev->nbuffersTx[BT_COMMAND],
|
||||
list_get_first_item(&bdev->nbuffersTx[BT_COMMAND]),
|
||||
snbuf);
|
||||
}
|
||||
@ -140,7 +140,7 @@ send_packet(hci_id hid, bt_packet_t type, net_buffer* nbuf)
|
||||
default:
|
||||
ERROR("%s: Unknown packet type for sending %d\n", __func__,
|
||||
type);
|
||||
// TODO: free the net_buffer -> no, allow upper layer
|
||||
// TODO: free the net_buffer -> no, allow upper layer
|
||||
// handle it with the given error
|
||||
err = B_BAD_VALUE;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user