Commit 67030a61 authored by Randy Dunlap's avatar Randy Dunlap Committed by Steve French

[PATCH] janitor: copy_to_user in media/video/pms

From: Daniele Bellucci <bellucda@tiscali.it>

Add a status check to copy_to_user() in a media/video driver.
parent 9c7c58f9
......@@ -12,6 +12,10 @@
* Most of this code is directly derived from his userspace driver.
* His driver works so send any reports to alan@redhat.com unless the
* userspace driver also doesn't work for you...
*
* Changes:
* 08/07/2003 Daniele Bellucci <bellucda@tiscali.it>
* - pms_capture: report back -EFAULT
*/
#include <linux/module.h>
......@@ -659,7 +663,8 @@ static int pms_capture(struct pms_device *dev, char *buf, int rgb555, int count)
if(dt+len>count)
dt=count-len;
cnt += dev->height;
copy_to_user(buf, tmp+32, dt);
if (copy_to_user(buf, tmp+32, dt))
return -EFAULT;
buf += dt;
len += dt;
}
......
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