aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-10 08:42:00 -0400
committerJaroslav Kysela <perex@suse.cz>2006-04-12 05:34:17 -0400
commit2462321bfe59b9c22ca1ec4ba8665a1aeac6bab5 (patch)
tree9753bc52df4417a64c84a845fc02d94221599afc
parent99e80e4d0c7755d688e9db205016a0608fa989b4 (diff)
[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: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/au88x0/au88x0_pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 6a13ca1d545e..7b5baa173859 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -506,7 +506,7 @@ static int __devinit snd_vortex_new_pcm(vortex_t * chip, int idx, int nr)
506 int i; 506 int i;
507 int err, nr_capt; 507 int err, nr_capt;
508 508
509 if ((chip == 0) || (idx < 0) || (idx > VORTEX_PCM_LAST)) 509 if ((chip == 0) || (idx < 0) || (idx >= VORTEX_PCM_LAST))
510 return -ENODEV; 510 return -ENODEV;
511 511
512 /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the 512 /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the