Skip to content

Commit

Permalink
[PATCH] Fix sequencer missing negative bound check
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Eugene Teo authored and Linus Torvalds committed Mar 25, 2006
1 parent 1ad3dcc commit 37f1e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/oss/sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,11 @@ static void seq_local_event(unsigned char *event_rec)

static void seq_sysex_message(unsigned char *event_rec)
{
int dev = event_rec[1];
unsigned int dev = event_rec[1];
int i, l = 0;
unsigned char *buf = &event_rec[2];

if ((int) dev > max_synthdev)
if (dev > max_synthdev)
return;
if (!(synth_open_mask & (1 << dev)))
return;
Expand Down

0 comments on commit 37f1e98

Please sign in to comment.