mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: avoid reading past the message size
We can't really get into this situation but it is a good idea to check that we don't try to read past the message length.
This commit is contained in:
parent
d79d2f69fb
commit
5d20e3028a
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ static int do_read(struct client *client)
|
||||||
} else {
|
} else {
|
||||||
uint32_t idx = client->in_index - sizeof(client->desc);
|
uint32_t idx = client->in_index - sizeof(client->desc);
|
||||||
|
|
||||||
if (client->message == NULL) {
|
if (client->message == NULL || client->message->length < idx) {
|
||||||
res = -EPROTO;
|
res = -EPROTO;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue