author: Daniele Bellucci <bellucda@tiscali.it>
* 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>
memset(lbuf, 0, count);
- copy_from_user(lbuf, buf, count);
+ if (copy_from_user(lbuf, buf, count))
+ return -EFAULT;
+
cur = lbuf;
/* skip initial spaces */