Commit b3390cea authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Takashi Iwai

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

get_user() may fail, if so return -EFAULT.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment