[PATCH] drivers/char/tipar.c: off by one array access
authorLuc Van Oostenryck <lkml@looxix.net>
Wed, 29 Jun 2005 03:44:44 +0000 (20:44 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 29 Jun 2005 04:20:29 +0000 (21:20 -0700)
In the setup function, the delay variable is initialized with ints[2],
but ints is declared as:
int ints[2];

Since the module parameter should correspond to:
tipar=timeout,delay

I suppose that the following patch fix the problem.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/tipar.c

index 659335d80ee73703b6c56b7653e454a34332402a..ec78d2f161f75363b5d971e7ba1713ef3aa4899f 100644 (file)
@@ -396,7 +396,7 @@ static struct file_operations tipar_fops = {
 static int __init
 tipar_setup(char *str)
 {
-       int ints[2];
+       int ints[3];
 
        str = get_options(str, ARRAY_SIZE(ints), ints);