summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authordavid decotigny <decot@googlers.com>2012-08-24 17:22:51 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-30 13:04:27 -0400
commitba9aa134287f6a59886ea91e0dadaa8477dec9c2 (patch)
tree27213aa8af9eae32ef1c20437d7ebe13c54191fc /drivers
parent6cc2ff82492d89f763e69ea6b8681926aceda610 (diff)
downloadlinux-ba9aa134287f6a59886ea91e0dadaa8477dec9c2.tar.gz
linux-ba9aa134287f6a59886ea91e0dadaa8477dec9c2.tar.bz2
linux-ba9aa134287f6a59886ea91e0dadaa8477dec9c2.zip
forcedeth: fix buffer overflow
Found by manual code inspection. Tested: compile, reboot, ethtool -d ethX Signed-off-by: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index f45def01a98e..51d19d8cb47c 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -4435,7 +4435,7 @@ static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void
regs->version = FORCEDETH_REGS_VER;
spin_lock_irq(&np->lock);
- for (i = 0; i <= np->register_size/sizeof(u32); i++)
+ for (i = 0; i < np->register_size/sizeof(u32); i++)
rbuf[i] = readl(base + i*sizeof(u32));
spin_unlock_irq(&np->lock);
}