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>
This commit is contained in:
committed by
David S. Miller
parent
6cc2ff8249
commit
ba9aa13428
@@ -4435,7 +4435,7 @@ static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void
|
|||||||
|
|
||||||
regs->version = FORCEDETH_REGS_VER;
|
regs->version = FORCEDETH_REGS_VER;
|
||||||
spin_lock_irq(&np->lock);
|
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));
|
rbuf[i] = readl(base + i*sizeof(u32));
|
||||||
spin_unlock_irq(&np->lock);
|
spin_unlock_irq(&np->lock);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user