This patch fixes a big array overun found by the Coverity checker.
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
--- 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;
}
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html