mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-19 16:01:45 +00: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
|
@ -195,7 +195,7 @@ static int do_read(struct client *client)
|
|||
} else {
|
||||
uint32_t idx = client->in_index - sizeof(client->desc);
|
||||
|
||||
if (client->message == NULL) {
|
||||
if (client->message == NULL || client->message->length < idx) {
|
||||
res = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue