mirror of
https://github.com/espressif/esp-idf.git
synced 2026-06-04 20:26:38 +03:00
fix(bt/bluedroid): check event ID if of register notification from remote to avoid OOB write
This commit is contained in:
@@ -242,7 +242,11 @@ static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_
|
||||
status = AVRC_STS_INTERNAL_ERR;
|
||||
} else {
|
||||
BE_STREAM_TO_UINT8 (p_result->reg_notif.event_id, p);
|
||||
BE_STREAM_TO_UINT32 (p_result->reg_notif.param, p);
|
||||
if (AVRC_IS_VALID_EVENT_ID(p_result->reg_notif.event_id)) {
|
||||
BE_STREAM_TO_UINT32 (p_result->reg_notif.param, p);
|
||||
} else {
|
||||
status = AVRC_STS_BAD_PARAM;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user