mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
bluedroid: Add continuation offset check to SDP server
Fix for CVE-2017-0785 https://android.googlesource.com/platform/system/bt/+/818cf6f%5E%21/#F0
This commit is contained in:
parent
00b5f82c41
commit
43b25e2a2f
@ -223,7 +223,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
|
|||||||
}
|
}
|
||||||
BE_STREAM_TO_UINT16 (cont_offset, p_req);
|
BE_STREAM_TO_UINT16 (cont_offset, p_req);
|
||||||
|
|
||||||
if (cont_offset != p_ccb->cont_offset) {
|
if (cont_offset != p_ccb->cont_offset || num_rsp_handles < cont_offset) {
|
||||||
sdpu_build_n_send_error (p_ccb, trans_num, SDP_INVALID_CONT_STATE,
|
sdpu_build_n_send_error (p_ccb, trans_num, SDP_INVALID_CONT_STATE,
|
||||||
SDP_TEXT_BAD_CONT_INX);
|
SDP_TEXT_BAD_CONT_INX);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user