mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-10 03:02:04 -04:00
avb: check packet sizes
Clamp packet len to the buffer size. Reject packets with invalid data_len.
This commit is contained in:
parent
47deb75247
commit
172f969650
3 changed files with 8 additions and 5 deletions
|
|
@ -154,8 +154,8 @@ static struct acmp_lt_timers *acmp_lt_add_timer_milan_v12(struct acmp_milan_v12
|
|||
if (tmr == NULL)
|
||||
return NULL;
|
||||
if (m) {
|
||||
memcpy(tmr->saved_packet, m, len);
|
||||
tmr->saved_packet_len = len;
|
||||
tmr->saved_packet_len = SPA_MIN(len, sizeof(tmr->saved_packet));
|
||||
memcpy(tmr->saved_packet, m, tmr->saved_packet_len);
|
||||
}
|
||||
|
||||
tmr->timeout = timeout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue