diff options
author | Eugene Teo <eugene.teo@eugeneteo.net> | 2006-03-25 06:08:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:23:02 -0500 |
commit | 37f1e984253c7eeee8e0f2be9d134d1e9e34b9d4 (patch) | |
tree | d46f9d866d88df62905717a21af3499f0ef30e3a /sound/oss/sequencer.c | |
parent | 1ad3dcc09c88c6e01d7624398c591ff3aee22fbe (diff) |
[PATCH] Fix sequencer missing negative bound check
'int dev' came out of an 'unsigned char *' - as such, it will not get
a negative value. Thanks Valdis.
Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Cc: Jaroslav Kysela <perex@suse.cz>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/sequencer.c')
-rw-r--r-- | sound/oss/sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index 698614226c9a..347cd79c2502 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c | |||
@@ -709,11 +709,11 @@ static void seq_local_event(unsigned char *event_rec) | |||
709 | 709 | ||
710 | static void seq_sysex_message(unsigned char *event_rec) | 710 | static void seq_sysex_message(unsigned char *event_rec) |
711 | { | 711 | { |
712 | int dev = event_rec[1]; | 712 | unsigned int dev = event_rec[1]; |
713 | int i, l = 0; | 713 | int i, l = 0; |
714 | unsigned char *buf = &event_rec[2]; | 714 | unsigned char *buf = &event_rec[2]; |
715 | 715 | ||
716 | if ((int) dev > max_synthdev) | 716 | if (dev > max_synthdev) |
717 | return; | 717 | return; |
718 | if (!(synth_open_mask & (1 << dev))) | 718 | if (!(synth_open_mask & (1 << dev))) |
719 | return; | 719 | return; |