aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/midi_synth.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-11-16 17:05:02 +0100
committerTakashi Iwai <tiwai@suse.de>2009-11-16 17:45:50 +0100
commit02bb57aeb092cbb0dfdb50c6026dbd0c60af7644 (patch)
tree1e7bf3b69ac92619e56d9d15a578a5d0fd4d73ad /sound/oss/midi_synth.c
parentMerge branch 'fix/misc' into topic/misc (diff)
downloadlinux-dev-02bb57aeb092cbb0dfdb50c6026dbd0c60af7644.tar.xz
linux-dev-02bb57aeb092cbb0dfdb50c6026dbd0c60af7644.zip
sound: OSS: keep index within bounds of midi_devs[]
When the {orig,midi}_dev equals num_midis, that's one too large already. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss/midi_synth.c')
-rw-r--r--sound/oss/midi_synth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/oss/midi_synth.c b/sound/oss/midi_synth.c
index 9e450988ed36..3bc7104c5379 100644
--- a/sound/oss/midi_synth.c
+++ b/sound/oss/midi_synth.c
@@ -426,7 +426,7 @@ midi_synth_open(int dev, int mode)
int err;
struct midi_input_info *inc;
- if (orig_dev < 0 || orig_dev > num_midis || midi_devs[orig_dev] == NULL)
+ if (orig_dev < 0 || orig_dev >= num_midis || midi_devs[orig_dev] == NULL)
return -ENXIO;
midi2synth[orig_dev] = dev;