From: Luc Van Oostenryck Date: Wed, 29 Jun 2005 03:44:44 +0000 (-0700) Subject: [PATCH] drivers/char/tipar.c: off by one array access X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45ae36cbce9c7f55615e2b5f8faf23c7a06d0bd2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] drivers/char/tipar.c: off by one array access 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index 659335d80ee7..ec78d2f161f7 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c @@ -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);