diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-11-16 11:05:02 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 11:45:50 -0500 |
commit | 02bb57aeb092cbb0dfdb50c6026dbd0c60af7644 (patch) | |
tree | 1e7bf3b69ac92619e56d9d15a578a5d0fd4d73ad /sound/oss/mpu401.c | |
parent | 0c3c35e148dbc03106038dd25816fb9f3a084d86 (diff) |
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/mpu401.c')
-rw-r--r-- | sound/oss/mpu401.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index 734b8f9e2f78..0af9d24feb8f 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c | |||
@@ -770,7 +770,7 @@ static int mpu_synth_ioctl(int dev, unsigned int cmd, void __user *arg) | |||
770 | 770 | ||
771 | midi_dev = synth_devs[dev]->midi_dev; | 771 | midi_dev = synth_devs[dev]->midi_dev; |
772 | 772 | ||
773 | if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev] == NULL) | 773 | if (midi_dev < 0 || midi_dev >= num_midis || midi_devs[midi_dev] == NULL) |
774 | return -ENXIO; | 774 | return -ENXIO; |
775 | 775 | ||
776 | devc = &dev_conf[midi_dev]; | 776 | devc = &dev_conf[midi_dev]; |