mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
hci: assert hci_get_sco_packet_length is smaller or equal to sco packet size
This commit is contained in:
parent
5029941384
commit
d966a45385
@ -4933,6 +4933,10 @@ int hci_get_sco_packet_length(void){
|
||||
} else {
|
||||
// 3 byte SCO header + SCO packet size over the air (60 bytes)
|
||||
sco_packet_length = 3 + 60 * multiplier;
|
||||
// assert that it still fits inside an SCO buffer
|
||||
if (sco_packet_length > hci_stack->sco_data_packet_length){
|
||||
sco_packet_length = 3 + 60;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user