提交 b3390cea 编写于 作者: K Kulikov Vasiliy 提交者: Takashi Iwai

sound: oss: midi_synth: check get_user() return value

get_user() may fail, if so return -EFAULT.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 5157cc81
......@@ -523,7 +523,9 @@ midi_synth_load_patch(int dev, int format, const char __user *addr,
{
unsigned char data;
get_user(*(unsigned char *) &data, (unsigned char __user *) &((addr)[hdr_size + i]));
if (get_user(data,
(unsigned char __user *)(addr + hdr_size + i)))
return -EFAULT;
eox_seen = (i > 0 && data & 0x80); /* End of sysex */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册