Add check of binding ranges in direct plugins

Add checks of slave channel numbers in bindings of dmix/dsnoop/dshare
plugins to avoid segfault.
Also, fix a possible memory leaks in the error path.
This commit is contained in:
Takashi Iwai 2006-04-26 18:30:44 +02:00
parent 4632e0f637
commit 6ff727bb7f
5 changed files with 25 additions and 11 deletions

View file

@ -808,7 +808,7 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
goto _err_nosem;
}
ret = snd_pcm_direct_parse_bindings(dmix, opts->bindings);
ret = snd_pcm_direct_parse_bindings(dmix, params, opts->bindings);
if (ret < 0)
goto _err_nosem;