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

[PATCH] missing copy_from_user check in comx_proto_lapb driver

parent 115bbb11
......@@ -232,7 +232,10 @@ static int comxlapb_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