mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-30 21:37:53 -04:00
spa: limit the number of buffer blocks
Unbounded values might overflow the stack.
This commit is contained in:
parent
3a503ea4b6
commit
4a303edb9e
2 changed files with 2 additions and 0 deletions
|
|
@ -507,6 +507,7 @@ static int negotiate_buffers(struct impl *this)
|
|||
|
||||
if (this->async)
|
||||
buffers = SPA_MAX(2u, buffers);
|
||||
blocks = SPA_MIN(blocks, 256u);
|
||||
|
||||
spa_log_info(this->log, "%p: buffers:%d, blocks:%d, size:%d, stride:%d align:%d %d:%d",
|
||||
this, buffers, blocks, size, stride, align, follower_alloc, conv_alloc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue