All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: jketreno@linux.intel.com, netdev@vger.kernel.org,
	linville@tuxdriver.com, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/net/wireless/ipw2200.c: fix an array overun
Date: Tue, 14 Mar 2006 11:05:36 +0800	[thread overview]
Message-ID: <1142305536.2622.35.camel@debian.sh.intel.com> (raw)
In-Reply-To: <20060311034258.GJ21864@stusta.de>

On Sat, 2006-03-11 at 04:42 +0100, Adrian Bunk wrote:
> This patch fixes a big array overun found by the Coverity checker.
> 
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> --- linux-2.6.16-rc5-mm3-full/drivers/net/wireless/ipw2200.c.old	2006-03-11 02:41:23.000000000 +0100
> +++ linux-2.6.16-rc5-mm3-full/drivers/net/wireless/ipw2200.c	2006-03-11 02:42:04.000000000 +0100
> @@ -9956,9 +9956,8 @@ static int ipw_ethtool_set_eeprom(struct
>  		return -EINVAL;
>  	mutex_lock(&p->mutex);
>  	memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len);
> -	for (i = IPW_EEPROM_DATA;
> -	     i < IPW_EEPROM_DATA + IPW_EEPROM_IMAGE_SIZE; i++)
> -		ipw_write8(p, i, p->eeprom[i]);
> +	for (i = 0; i < IPW_EEPROM_IMAGE_SIZE; i++)
> +		ipw_write8(p, i + IPW_EEPROM_DATA, p->eeprom[i]);
>  	mutex_unlock(&p->mutex);
>  	return 0;
>  }

Acked-by: Zhu Yi <yi.zhu@intel.com>

Thanks,
-yi


  reply	other threads:[~2006-03-14  3:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11  3:42 [2.6 patch] drivers/net/wireless/ipw2200.c: fix an array overun Adrian Bunk
2006-03-14  3:05 ` Zhu Yi [this message]
2006-03-18  1:13 ` John W. Linville

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=1142305536.2622.35.camel@debian.sh.intel.com \
    --to=yi.zhu@intel.com \
    --cc=bunk@stusta.de \
    --cc=jketreno@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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 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.