mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
rawmidi_hw: add sanity check for the invalid stream arguments (coverity)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
8ab0393b42
commit
6efa23f283
1 changed files with 2 additions and 0 deletions
|
|
@ -186,6 +186,8 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
||||||
*inputp = NULL;
|
*inputp = NULL;
|
||||||
if (outputp)
|
if (outputp)
|
||||||
*outputp = NULL;
|
*outputp = NULL;
|
||||||
|
if (!inputp && !outputp)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if ((ret = snd_ctl_hw_open(&ctl, NULL, card, 0)) < 0)
|
if ((ret = snd_ctl_hw_open(&ctl, NULL, card, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue