Commit 9d5a6ebb authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] missing copy_from_user check in mixcom driver.

parent 85b00e35
......@@ -763,7 +763,10 @@ static int mixcom_write_proc(struct file *file, const char *buffer,
return -ENOMEM;
}
copy_from_user(page, buffer, count = min_t(unsigned long, count, PAGE_SIZE));
if (copy_from_user(page, buffer, count = min_t(unsigned long, count, PAGE_SIZE))) {
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