From e86b29433d4325a40e3b3ad742fa7b79f1a202fb Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 18 Jul 2003 18:36:30 -0700 Subject: [PATCH] [PATCH] janitor: unchecked copy_from_user in parisc/led.c author: Daniele Bellucci --- drivers/parisc/led.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 69a53774882d8..d164351b49254 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -14,6 +14,10 @@ * 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 */ #include @@ -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 */ -- 2.53.0