summaryrefslogtreecommitdiffstats
path: root/sound/oss/midi_synth.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-05 11:17:04 +0200
committerTakashi Iwai <tiwai@suse.de>2010-08-05 11:17:04 +0200
commit74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (patch)
treef41312c0943978842ac258873b29da04d72d0625 /sound/oss/midi_synth.c
parente71981343ad29b5d929f82ac56c0b27b8ea0e540 (diff)
parentc4685849b4d725ab80cd29f5e09f5f128b4724b5 (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/oss/midi_synth.c')
-rw-r--r--sound/oss/midi_synth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/oss/midi_synth.c b/sound/oss/midi_synth.c
index 3bc7104c537..3c09374ea5b 100644
--- a/sound/oss/midi_synth.c
+++ b/sound/oss/midi_synth.c
@@ -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 */