diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-05-01 11:59:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:30 -0400 |
commit | 76530da1a9e8ce05963b1f49a098eddc6ec6c534 (patch) | |
tree | bf0e2300abac0314de8af66020513fd551f14f62 /sound | |
parent | 6c207e769297946a0adec45225c6999f1299dde3 (diff) |
[PATCH] sound/oss/sonicvibes.c: fix an array overflow
This patch fixes an array overflow found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/sonicvibes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index e1d69611a257..06047e7979af 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c | |||
@@ -1149,7 +1149,7 @@ static int mixer_ioctl(struct sv_state *s, unsigned int cmd, unsigned long arg) | |||
1149 | if (mixtable[i].rec) | 1149 | if (mixtable[i].rec) |
1150 | break; | 1150 | break; |
1151 | } | 1151 | } |
1152 | if (!mixtable[i].rec) | 1152 | if (i == SOUND_MIXER_NRDEVICES) |
1153 | return 0; | 1153 | return 0; |
1154 | spin_lock_irqsave(&s->lock, flags); | 1154 | spin_lock_irqsave(&s->lock, flags); |
1155 | frobindir(s, SV_CIMIX_ADCINL, 0x1f, mixtable[i].rec << 5); | 1155 | frobindir(s, SV_CIMIX_ADCINL, 0x1f, mixtable[i].rec << 5); |