Commit 9739f37d authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] missing copy_from_user check in comx-proto-fr driver

parent 7bb3f4d2
......@@ -657,7 +657,10 @@ static int fr_write_proc(struct file *file, const char *buffer,
return -ENOMEM;
}
copy_from_user(page, buffer, count);
if (copy_from_user(page, buffer, count)) {
free_page((unsigned long)page);
return -EFAULT;
}
if (*(page + count - 1) == '\n') {
*(page + count - 1) = 0;
}
......
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