From: Dan Carpenter Date: Mon, 22 Mar 2010 02:07:28 +0000 (+0000) Subject: ewrk3: range checking problem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=664ffe80c0df5ad2576420ed2e6bd75cc704ba3a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }