[PATCH] [UBUNTU:sound/pci/au88x0/] Fix overrun in sound/pci/au88x0/au88x0_pcm.c
crimsun at fungus.sh.nu
crimsun at fungus.sh.nu
Thu Apr 13 00:38:52 UTC 2006
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/perex/alsa-current.git;a=commitdiff;h=c4d3cccce9039437045c4b1ce70bd71a3dbcfde3
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 <crimsun at ubuntu.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 crimsun at ubuntu.com
GPG key: www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060412/6fb572f6/attachment.sig>
More information about the kernel-team
mailing list