From a71b9978819ce25f911af16fc4d7b96fcdf665d4 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:52:45 +0300 Subject: [PATCH] staging: slicoss Check for valid hw address Check for valid hw address. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index a18eeb6..9c8eb09 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr) if (!adapter) return -EBUSY; + if (!is_valid_ether_addr(addr->sa_data)) + return -EINVAL; + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len); -- 2.7.4