From: Mattia Dongili <malattia@linux.it>
To: Adrian Bunk <bunk@kernel.org>
Cc: Len Brown <len.brown@intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] sony-laptop.c: fix off-by-one
Date: Wed, 20 Feb 2008 08:27:56 +0900 [thread overview]
Message-ID: <20080219232756.GA19495@inferi.kami.home> (raw)
In-Reply-To: <20080219225903.GS31955@cs181133002.pp.htv.fi>
On Wed, Feb 20, 2008 at 12:59:03AM +0200, Adrian Bunk wrote:
> This patch fixes an off-by-one spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Mattia Dongili <malattia@linux.it>
> ---
> --- linux-2.6/drivers/misc/sony-laptop.c.old 2008-02-20 00:26:21.000000000 +0200
> +++ linux-2.6/drivers/misc/sony-laptop.c 2008-02-20 00:26:38.000000000 +0200
> @@ -314,9 +314,9 @@ static void sony_laptop_report_input_eve
> kp.dev = jog_dev;
> break;
>
> default:
> - if (event > ARRAY_SIZE(sony_laptop_input_index)) {
> + if (event >= ARRAY_SIZE(sony_laptop_input_index)) {
> dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
> break;
> }
> if (sony_laptop_input_index[event] != -1) {
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
mattia
:wq!
next prev parent reply other threads:[~2008-02-20 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 22:59 Adrian Bunk
2008-02-19 23:27 ` Mattia Dongili [this message]
2008-02-21 9:58 ` Len Brown
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=20080219232756.GA19495@inferi.kami.home \
--to=malattia@linux.it \
--cc=bunk@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®