Commit e86b2943 authored by Randy Dunlap's avatar Randy Dunlap Committed by Steve French

[PATCH] janitor: unchecked copy_from_user in parisc/led.c

author: Daniele Bellucci <bellucda@tiscali.it>
parent 90141a75
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
* TODO: * TODO:
* - speed-up calculations with inlined assembler * - speed-up calculations with inlined assembler
* - interface to write to second row of LCD from /proc (if technically possible) * - interface to write to second row of LCD from /proc (if technically possible)
*
* Changes:
* - Audit copy_from_user in led_proc_write.
* Daniele Bellucci <bellucda@tiscali.it>
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -160,7 +164,9 @@ static int led_proc_write(struct file *file, const char *buf, ...@@ -160,7 +164,9 @@ static int led_proc_write(struct file *file, const char *buf,
memset(lbuf, 0, count); memset(lbuf, 0, count);
copy_from_user(lbuf, buf, count); if (copy_from_user(lbuf, buf, count))
return -EFAULT;
cur = lbuf; cur = lbuf;
/* skip initial spaces */ /* skip initial spaces */
......
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