List Info

Thread: Fix overrun in sound/pci/au88x0/au88x0_pcm.c




Fix overrun in sound/pci/au88x0/au88x0_pcm.c
user name
2006-04-13 00:38:52
Subject: [PATCH] [UBUNTU:sound/pci/au88x0/] Fix overrun in
sound/pci/au88x0/au88x0_pcm.c

UpstreamStatus: Added in http://www.kernel.org/git/?p=linux/kernel/git/pe
rex/alsa-current.git;a=commitdiff;h=c4d3cccce9039437045c4b1c
e70bd71a3dbcfde3

This patch from Eric Sesterhenn fixes Coverity #572:
"since idx is used as an index for
vortex_pcm_prettyname[VORTEX_PCM_LAST],
it should not be equal to VORTEX_PCM_LAST."

Signed-off-by: Daniel T Chen <crimsunubuntu.com>

---

 sound/pci/au88x0/au88x0_pcm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

62885c87738c38bba5ed75db896f774f8022a626
diff --git a/sound/pci/au88x0/au88x0_pcm.c
b/sound/pci/au88x0/au88x0_pcm.c
index 38bd2b5..a74921d 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(
 	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 
-- 
1.1.3


-- 
Daniel T. Chen            crimsunubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-- 
kernel-team mailing list
kernel-teamlists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )