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, ...@@ -474,10 +474,8 @@ static ssize_t vlsi_proc_read(struct file *file, char *buf, size_t nbytes,
if (pos + nbytes > size) if (pos + nbytes > size)
nbytes = size - pos; nbytes = size - pos;
if (!access_ok(VERIFY_WRITE, buf, nbytes)) if (copy_to_user(buf, procdata->data + pos, nbytes))
return -EINVAL; return -EFAULT;
copy_to_user(buf, procdata->data + pos, nbytes);
*ppos += nbytes; *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