Skip to content

Commit

Permalink
[PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and John W. Linville committed Mar 17, 2006
1 parent f44349f commit 71e585f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 71e585f

Please sign in to comment.