diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-10 22:42:58 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-03-17 15:41:20 -0500 |
commit | 71e585fca25c9ccde82196fd1aef78e34312e899 (patch) | |
tree | 4cb6cf43dcc6f7cae5c0191f0e409b0eb2a72261 /drivers | |
parent | f44349f2217d05e4575f24edc3c0e0022f5d448f (diff) |
[PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
This patch fixes a big array overun found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 65c5b1422ec9..93d53f9dab0e 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -9972,9 +9972,8 @@ static int ipw_ethtool_set_eeprom(struct net_device *dev, | |||
9972 | return -EINVAL; | 9972 | return -EINVAL; |
9973 | mutex_lock(&p->mutex); | 9973 | mutex_lock(&p->mutex); |
9974 | memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len); | 9974 | memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len); |
9975 | for (i = IPW_EEPROM_DATA; | 9975 | for (i = 0; i < IPW_EEPROM_IMAGE_SIZE; i++) |
9976 | i < IPW_EEPROM_DATA + IPW_EEPROM_IMAGE_SIZE; i++) | 9976 | ipw_write8(p, i + IPW_EEPROM_DATA, p->eeprom[i]); |
9977 | ipw_write8(p, i, p->eeprom[i]); | ||
9978 | mutex_unlock(&p->mutex); | 9977 | mutex_unlock(&p->mutex); |
9979 | return 0; | 9978 | return 0; |
9980 | } | 9979 | } |