mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -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;
|
||||
if (outputp)
|
||||
*outputp = NULL;
|
||||
if (!inputp && !outputp)
|
||||
return -EINVAL;
|
||||
|
||||
if ((ret = snd_ctl_hw_open(&ctl, NULL, card, 0)) < 0)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue