From: Luc Van Oostenryck <lkml@looxix.net>
To: randy_dunlap <rdunlap@xenotime.net>
Cc: linux-kernel@vger.kernel.org, roms@lpg.ticalc.org
Subject: Re: [PATCH] drivers/char/tipar.c: off by one array access
Date: Tue, 21 Jun 2005 00:35:16 +0200 [thread overview]
Message-ID: <42B744A4.3080104@looxix.net> (raw)
In-Reply-To: <20050619200351.640e55ac.rdunlap@xenotime.net>
randy_dunlap wrote:
> On Sun, 19 Jun 2005 17:15:30 +0200 Luc Van Oostenryck wrote:
>
> | In the setupt 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.
...
>
> That (re)uses the timeout value for delay.
> Please try again....
>
> get_options() sets ints[0] to the number of parameters parsed
> and tipar_setup() clearly wants to parse as you described:
> | tipar=timeout,delay
> so the ints[] array needs to be [3], not [2].
>
> ---
> ~Randy
Yes, sorry. Here is another patch.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
--- 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);
prev parent reply other threads:[~2005-06-21 4:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 15:15 [PATCH] drivers/char/tipar.c: off by one array access Luc Van Oostenryck
2005-06-20 3:03 ` randy_dunlap
2005-06-20 22:35 ` Luc Van Oostenryck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42B744A4.3080104@looxix.net \
--to=lkml@looxix.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=roms@lpg.ticalc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox