Commit 2462321b authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Jaroslav Kysela

[ALSA] Overrun in sound/pci/au88x0/au88x0_pcm.c

Modules: au88x0 driver

since idx is used as an index for vortex_pcm_prettyname[VORTEX_PCM_LAST],
it should not be equal to VORTEX_PCM_LAST. This fixes coverity bug id #572
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 99e80e4d
......@@ -506,7 +506,7 @@ static int __devinit snd_vortex_new_pcm(vortex_t * chip, int idx, int nr)
int i;
int err, nr_capt;
if ((chip == 0) || (idx < 0) || (idx > VORTEX_PCM_LAST))
if ((chip == 0) || (idx < 0) || (idx >= VORTEX_PCM_LAST))
return -ENODEV;
/* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment