]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: snd_pcm_slave_conf - fix C99 variable-length array allocation
authorJaroslav Kysela <perex@perex.cz>
Mon, 25 May 2026 10:34:37 +0000 (12:34 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 25 May 2026 10:34:37 +0000 (12:34 +0200)
commit33c9949e75593c09a5e08fa3f867a0734c8d5ca3
treec2943b57fa9333c3de86dbd3a5d8654504a7a6c1
parent6f074eefb117fc935bc8d6f26b7ae0223f971e21
pcm: snd_pcm_slave_conf - fix C99 variable-length array allocation

The C standard (C99 ยง6.7.5.2p1) requires VLA bounds to be greater than zero;
a bound of 0 is undefined behavior. Reported by UBSan.

Fixes: https://github.com/alsa-project/alsa-lib/issues/505
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c