mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
spa: add spa_alloca that does overflow and limit checks
Make a function like alloca but with overflow checks and a max allocation size. Use this function where we can and also make sure that all alloca calls are in some way limited.
This commit is contained in:
parent
a9f1ad414e
commit
ed2c0ad4ee
10 changed files with 84 additions and 51 deletions
|
|
@ -34,6 +34,9 @@
|
|||
|
||||
#define MAXLENGTH (4u*1024*1024) /* 4MB */
|
||||
|
||||
/* pulseaudio has a 128 char limit for this but we can allow more */
|
||||
#define MAX_NAME 1024u
|
||||
|
||||
#define SCACHE_ENTRY_SIZE_MAX (1024*1024*16)
|
||||
|
||||
#define MODULE_INDEX_MASK 0xfffffffu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue