Skip to content

Commit

Permalink
[ALSA] Overrun in sound/pci/au88x0/au88x0_pcm.c
Browse files Browse the repository at this point in the history
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: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eric Sesterhenn authored and Jaroslav Kysela committed Apr 12, 2006
1 parent 99e80e4 commit 2462321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/au88x0/au88x0_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2462321

Please sign in to comment.