提交 71e585fc 编写于 作者: A Adrian Bunk 提交者: John W. Linville

[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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 f44349f2
......@@ -9972,9 +9972,8 @@ static int ipw_ethtool_set_eeprom(struct net_device *dev,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册