From 664ffe80c0df5ad2576420ed2e6bd75cc704ba3a Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 22 Mar 2010 02:07:28 +0000 Subject: [PATCH] ewrk3: range checking problem The range checking here is wrong. It should be HASH_TABLE_LEN which is 512. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- drivers/net/ewrk3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index 91e59f3a9d6d..a2bade586886 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c @@ -1776,8 +1776,7 @@ static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) break; case EWRK3_SET_MCA: /* Set a multicast address */ if (capable(CAP_NET_ADMIN)) { - if (ioc->len > 1024) - { + if (ioc->len > HASH_TABLE_LEN) { status = -EINVAL; break; } -- 2.20.1