All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] libertas: Read buffer overflow
Date: Tue, 04 Aug 2009 11:16:35 -0400	[thread overview]
Message-ID: <1249398995.21155.2.camel@localhost.localdomain> (raw)
In-Reply-To: <4A7543CC.2010206@gmail.com>

On Sun, 2009-08-02 at 09:44 +0200, Roel Kluin wrote:
> Check whether index is within bounds before testing the element.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
> diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
> index 9a5408e..5c69681 100644
> --- a/drivers/net/wireless/libertas/11d.c
> +++ b/drivers/net/wireless/libertas/11d.c
> @@ -47,7 +47,7 @@ static u8 lbs_region_2_code(u8 *region)
>  {
>  	u8 i;
>  
> -	for (i = 0; region[i] && i < COUNTRY_CODE_LEN; i++)
> +	for (i = 0; i < COUNTRY_CODE_LEN && region[i]; i++)
>  		region[i] = toupper(region[i]);
>  
>  	for (i = 0; i < ARRAY_SIZE(region_code_mapping); i++) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2009-08-04 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02  7:44 [PATCH] libertas: Read buffer overflow Roel Kluin
2009-08-04 15:16 ` Dan Williams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28  8:00 Roel Kluin
2009-07-28  8:19 ` Holger Schurig
2009-07-28 10:05   ` Roel Kluin

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=1249398995.21155.2.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=roel.kluin@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.