aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/davinci_emac.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-02 16:07:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-03 04:04:39 -0500
commit4d27b87785a743fdae653d395a3a4e763269c53c (patch)
tree6d2458620d07a9c34b91c9814bafbca3fc91f3a3 /drivers/net/davinci_emac.c
parentbf829370a8d664d87a61697c8a0d6d780c336aa4 (diff)
davinci_emac: off by one
This off by one error was found by smatch. drivers/net/davinci_emac.c +2390 emac_dev_open(13) error: buffer overflow 'priv->mac_addr' 6 <= 6 Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r--drivers/net/davinci_emac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 1ac9440eb3fb..32960b9b02ae 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -2385,7 +2385,7 @@ static int emac_dev_open(struct net_device *ndev)
2385 struct emac_priv *priv = netdev_priv(ndev); 2385 struct emac_priv *priv = netdev_priv(ndev);
2386 2386
2387 netif_carrier_off(ndev); 2387 netif_carrier_off(ndev);
2388 for (cnt = 0; cnt <= ETH_ALEN; cnt++) 2388 for (cnt = 0; cnt < ETH_ALEN; cnt++)
2389 ndev->dev_addr[cnt] = priv->mac_addr[cnt]; 2389 ndev->dev_addr[cnt] = priv->mac_addr[cnt];
2390 2390
2391 /* Configuration items */ 2391 /* Configuration items */