summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-25 22:07:32 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-07 09:44:29 -0700
commit9f45b01aa6885323f18fe56e3fe19a6df5b7f1e9 (patch)
treeed24a2a62989154dc96cf27cd9391b90f21a0105
parentecb5414cdc6725b3e287af6412afe3adb0c6c07b (diff)
downloadkernel-common-9f45b01aa6885323f18fe56e3fe19a6df5b7f1e9.tar.gz
kernel-common-9f45b01aa6885323f18fe56e3fe19a6df5b7f1e9.tar.bz2
kernel-common-9f45b01aa6885323f18fe56e3fe19a6df5b7f1e9.zip
[PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
This patch fixes a big array overun found by the Coverity checker. This was already fixed in Linus' tree. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/wireless/ipw2200.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 287676ad80df..aa6f3a43952a 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -9956,9 +9956,8 @@ static int ipw_ethtool_set_eeprom(struct net_device *dev,
return -EINVAL;
down(&p->sem);
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]);
up(&p->sem);
return 0;
}