Commit 84741e83 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds

[PATCH] check copy_from_user return value in act2000_isa_download

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9cac853e
......@@ -434,7 +434,10 @@ act2000_isa_download(act2000_card * card, act2000_ddef __user * cb)
l = (length > 1024) ? 1024 : length;
c = 0;
b = buf;
copy_from_user(buf, p, l);
if (copy_from_user(buf, p, l)) {
kfree(buf);
return -EFAULT;
}
while (c < l) {
if (act2000_isa_writeb(card, *b++)) {
printk(KERN_WARNING
......
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