mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-09 10:38:17 +02:00
sendspin: avoid buffer overread
Check that we have enough bytes (>=9) to parse the message type and the timestamp.
This commit is contained in:
parent
22243d5ce9
commit
6cee86e509
1 changed files with 6 additions and 1 deletions
|
|
@ -876,9 +876,14 @@ static int do_handle_binary(struct client *client, const uint8_t *payload, int s
|
|||
{
|
||||
struct impl *impl = client->impl;
|
||||
int32_t filled;
|
||||
uint32_t index, length = size - 9;
|
||||
uint32_t index, length;
|
||||
uint64_t timestamp;
|
||||
|
||||
if (size < 9)
|
||||
return 0;
|
||||
|
||||
length = size - 9;
|
||||
|
||||
if (payload[0] != 4 || client->stream == NULL)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue