Skip to content

Commit

Permalink
[PATCH] drivers/char/tipar.c: off by one array access
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luc Van Oostenryck authored and Linus Torvalds committed Jun 29, 2005
1 parent 47f176f commit 45ae36c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tipar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 45ae36c

Please sign in to comment.