]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: replace multi plugin binding asserts with -EINVAL checks
authorHarsh Raj Singhania <raj.harshraut@gmail.com>
Wed, 30 Sep 2026 18:58:53 +0000 (00:28 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 15 Oct 2026 13:46:44 +0000 (15:46 +0200)
commit81c4a89eb445f8e991ca80ab55b5649530c0aacd
treee771e8ce42684c8831b58d1702066741ce5fa7be
parent807e4ded9511e7e3cd17b915ea3cda1faf6611e6
pcm: replace multi plugin binding asserts with -EINVAL checks

Sparse binding maps leave sidxs[i] == -1 for gap indices. The previous
assert() calls caused SIGABRT in debug builds and OOB reads under NDEBUG.
Return -EINVAL with explicit bounds and sign checks instead.

[ fixed coding style -- tiwai ]

Closes: https://github.com/alsa-project/alsa-lib/pull/527
Signed-off-by: Harsh Raj Singhania <raj.harshraut@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_multi.c