mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-09 03:01:53 -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
|
|
@ -760,6 +760,8 @@ static void handle_aaf_packet(struct stream *stream,
|
|||
|
||||
filled = spa_ringbuffer_get_write_index(&stream->ring, &index);
|
||||
n_bytes = ntohs(p->data_len);
|
||||
if (n_bytes > (uint32_t)(len - (int)sizeof(*p)))
|
||||
return;
|
||||
|
||||
/* IEEE 1722.1 Section 7.4.42 / Milan Section 5.4.5.3: FRAMES_RX counts every valid
|
||||
* AVTPDU received on the wire — independent of whether the listener
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue