提交 37f1e984 编写于 作者: E Eugene Teo 提交者: Linus Torvalds

[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: NEugene Teo <eugene.teo@eugeneteo.net>
Cc: Jaroslav Kysela <perex@suse.cz>
Acked-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 1ad3dcc0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册