Commit 49a3a2ce authored by Randy Dunlap's avatar Randy Dunlap Committed by Steve French

[PATCH] janitor: copy_to_user in net/irda/vlsi_ir

From:  Matthew Wilcox <willy@debian.org> and Daniele Bellucci <bellucda@tiscali.it>

Fix an unchecked copy_to_user() in net/irda/vlsi_ir.c.
parent 67030a61
......@@ -474,10 +474,8 @@ static ssize_t vlsi_proc_read(struct file *file, char *buf, size_t nbytes,
if (pos + nbytes > size)
nbytes = size - pos;
if (!access_ok(VERIFY_WRITE, buf, nbytes))
return -EINVAL;
copy_to_user(buf, procdata->data + pos, nbytes);
if (copy_to_user(buf, procdata->data + pos, nbytes))
return -EFAULT;
*ppos += nbytes;
......
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