mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-28 06:46:42 -04:00
milan-avb: validate packet length before dereferencing SET_CONTROL value byte
This commit is contained in:
parent
0291895498
commit
09f9100ce7
1 changed files with 5 additions and 0 deletions
|
|
@ -150,6 +150,11 @@ static int handle_cmd_set_control_identify(struct aecp *aecp, struct descriptor
|
|||
old_value_format = desc_formats;
|
||||
value_req = (uint8_t *)control->payload;
|
||||
|
||||
if (len < 0 || (size_t)len < sizeof(*h) + sizeof(*p) +
|
||||
sizeof(*control) + CONTROL_LINEAR_UINT8_SIZE)
|
||||
return reply_status(aecp, AVB_AECP_AEM_STATUS_BAD_ARGUMENTS,
|
||||
m, len);
|
||||
|
||||
if (*value_req == desc_formats->current_value) {
|
||||
return reply_success(aecp, m, len);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue