Commit 9f45b01a authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman

[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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ecb5414c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment