From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] lm8333: Fix check ordering
Date: Wed, 4 Jul 2012 13:05:50 -0700 [thread overview]
Message-ID: <20120704200550.GA13248@core.coreip.homeip.net> (raw)
In-Reply-To: <20120704145653.7910.26502.stgit@localhost.localdomain>
Hi Alan,
On Wed, Jul 04, 2012 at 03:57:00PM +0100, Alan Cox wrote:
> From: Alan Cox <alan@linux.intel.com>
>
> Fix harmless reference off end of array
>
> Reported-by: <dcb314@hotmail.com>
> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?43861
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
> drivers/input/keyboard/lm8333.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
> index ca168a6..081fd9e 100644
> --- a/drivers/input/keyboard/lm8333.c
> +++ b/drivers/input/keyboard/lm8333.c
> @@ -91,7 +91,7 @@ static void lm8333_key_handler(struct lm8333 *lm8333)
> return;
> }
>
> - for (i = 0; keys[i] && i < LM8333_FIFO_TRANSFER_SIZE; i++) {
> + for (i = 0; i < LM8333_FIFO_TRANSFER_SIZE && keys[i]; i++) {
> pressed = keys[i] & 0x80;
> code = keys[i] & 0x7f;
>
>
I believe Jiri has already queued this through trivial tree...
Thanks.
--
Dmitry
next prev parent reply other threads:[~2012-07-04 20:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 14:57 [PATCH] lm8333: Fix check ordering Alan Cox
2012-07-04 20:05 ` Dmitry Torokhov [this message]
2012-07-04 21:45 ` Jiri Kosina
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=20120704200550.GA13248@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jkosina@suse.cz \
--cc=linux-input@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