pulse-server: check message size

This commit is contained in:
Wim Taymans 2021-03-25 18:05:26 +01:00
parent 27a5ebb87e
commit 0af8c0c045

View file

@ -357,7 +357,8 @@ static struct message *message_alloc(struct impl *impl, uint32_t channel, uint32
msg->stat->n_allocated++; msg->stat->n_allocated++;
msg->stat->n_accumulated++; msg->stat->n_accumulated++;
} }
ensure_size(msg, size); if (ensure_size(msg, size) < 0)
return NULL;
spa_zero(msg->extra); spa_zero(msg->extra);
msg->channel = channel; msg->channel = channel;
msg->offset = 0; msg->offset = 0;