hci: assert hci_get_sco_packet_length is smaller or equal to sco packet size

This commit is contained in:
Matthias Ringwald 2019-03-07 14:25:48 +01:00
parent 5029941384
commit d966a45385

View File

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