mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-06-21 14:33:19 -04:00
conf: add missing return value check in parse_def()
A malformed configuration may cause SIGSEGV. Link: https://lore.kernel.org/alsa-devel/CAGt8pqBU0p2voB+qHxWGcNJrKHAcBhAyHUUBPLBN-Yj_SiV6MQ@mail.gmail.com/ Reported-by: Luigino Camastra <luigino.camastra@aisle.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d983a9ccbc
commit
536dd6f8af
1 changed files with 4 additions and 0 deletions
|
|
@ -1485,6 +1485,10 @@ static int parse_def(snd_config_t *parent, input_t *input, int skip, int overrid
|
|||
endchr = ']';
|
||||
}
|
||||
c = get_nonwhite(input);
|
||||
if (c < 0) {
|
||||
err = c;
|
||||
goto __end;
|
||||
}
|
||||
if (c != endchr) {
|
||||
if (n)
|
||||
snd_config_delete(n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue