Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba9aa134 authored by david decotigny's avatar david decotigny Committed by David S. Miller
Browse files

forcedeth: fix buffer overflow



Found by manual code inspection.

Tested: compile, reboot, ethtool -d ethX

Signed-off-by: default avatarDavid Decotigny <decot@googlers.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6cc2ff82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}