mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: handle message errors
This commit is contained in:
parent
bb8bd3d76d
commit
bc1192c8dd
2 changed files with 21 additions and 0 deletions
|
|
@ -500,6 +500,9 @@ static int message_put(struct message *m, ...)
|
|||
{
|
||||
va_list va;
|
||||
|
||||
if (m == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
va_start(va, m);
|
||||
|
||||
while (true) {
|
||||
|
|
@ -557,5 +560,8 @@ static int message_put(struct message *m, ...)
|
|||
}
|
||||
va_end(va);
|
||||
|
||||
if (m->length > m->allocated)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue