[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>
This commit is contained in:
committed by
John W. Linville
parent
f44349f221
commit
71e585fca2
@@ -9972,9 +9972,8 @@ static int ipw_ethtool_set_eeprom(struct net_device *dev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
mutex_lock(&p->mutex);
|
mutex_lock(&p->mutex);
|
||||||
memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len);
|
memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len);
|
||||||
for (i = IPW_EEPROM_DATA;
|
for (i = 0; i < IPW_EEPROM_IMAGE_SIZE; i++)
|
||||||
i < IPW_EEPROM_DATA + IPW_EEPROM_IMAGE_SIZE; i++)
|
ipw_write8(p, i + IPW_EEPROM_DATA, p->eeprom[i]);
|
||||||
ipw_write8(p, i, p->eeprom[i]);
|
|
||||||
mutex_unlock(&p->mutex);
|
mutex_unlock(&p->mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user