Bluetooth: Classic: HFP_AG: Avoid potential array out-of-bounds access issues. #90774
Labels
area: Bluetooth Classic
Bluetooth Classic (BR/EDR)
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
At line 283 of the function
get_new_call()
in the file zephyr/subsys/bluetooth/host/classic/hfp_ag.c, when accessing a fixed-length data, it is not considered whether the array will cross the boundary.zephyr/subsys/bluetooth/host/classic/hfp_ag.c
Line 283 in 265cfb4
However, this issue is not possible at present because all callers of the
get_new_call()
function will confirm that the length of number is less than the buffer size before calling the functionget_new_call()
.zephyr/subsys/bluetooth/host/classic/hfp_ag.c
Lines 2519 to 2526 in 265cfb4
zephyr/subsys/bluetooth/host/classic/hfp_ag.c
Lines 3838 to 3841 in 265cfb4
To avoid potential array out-of-bounds access issues and easy to maintain, improve it.
The text was updated successfully, but these errors were encountered: