pulse-server: handle message errors

This commit is contained in:
Wim Taymans 2020-10-21 12:00:25 +02:00
parent bb8bd3d76d
commit bc1192c8dd
2 changed files with 21 additions and 0 deletions

View file

@ -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;
}