projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5157cc8
)
sound: oss: midi_synth: check get_user() return value
author
Kulikov Vasiliy
<segooon@gmail.com>
Wed, 28 Jul 2010 16:41:17 +0000
(20:41 +0400)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 29 Jul 2010 10:25:06 +0000
(12:25 +0200)
get_user() may fail, if so return -EFAULT.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/midi_synth.c
patch
|
blob
|
history
diff --git
a/sound/oss/midi_synth.c
b/sound/oss/midi_synth.c
index
3bc7104
..
3c09374
100644
(file)
--- 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 */