]> git.hungrycats.org Git - linux/commitdiff
[PATCH] janitor: unchecked copy_from_user in parisc/led.c
authorRandy Dunlap <rddunlap@osdl.org>
Sat, 19 Jul 2003 01:36:30 +0000 (18:36 -0700)
committerSteve French <cifs.adm@hostme.bitkeeper.com>
Sat, 19 Jul 2003 01:36:30 +0000 (18:36 -0700)
author: Daniele Bellucci <bellucda@tiscali.it>

drivers/parisc/led.c

index 69a53774882d8fcac00fbf41b719a1bfe02b142d..d164351b49254cac3e5ef9bfbda56383351093f0 100644 (file)
  * TODO:
  *     - speed-up calculations with inlined assembler
  *     - 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>
@@ -160,7 +164,9 @@ static int led_proc_write(struct file *file, const char *buf,
 
        memset(lbuf, 0, count);
 
-       copy_from_user(lbuf, buf, count);
+       if (copy_from_user(lbuf, buf, count))
+               return -EFAULT;
+
        cur = lbuf;
 
        /* skip initial spaces */