From: Eric Sesterhenn Date: Mon, 10 Apr 2006 12:42:00 +0000 (+0200) Subject: [ALSA] Overrun in sound/pci/au88x0/au88x0_pcm.c X-Git-Tag: v2.6.17-rc2~88 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2462321bfe59b9c22ca1ec4ba8665a1aeac6bab5;p=linux-2.6 [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 Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c index 6a13ca1d54..7b5baa1738 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) 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