ewrk3: range checking problem
The range checking here is wrong. It should be HASH_TABLE_LEN which is 512. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ecbacf8da7
commit
664ffe80c0
@@ -1776,8 +1776,7 @@ static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||||||
break;
|
break;
|
||||||
case EWRK3_SET_MCA: /* Set a multicast address */
|
case EWRK3_SET_MCA: /* Set a multicast address */
|
||||||
if (capable(CAP_NET_ADMIN)) {
|
if (capable(CAP_NET_ADMIN)) {
|
||||||
if (ioc->len > 1024)
|
if (ioc->len > HASH_TABLE_LEN) {
|
||||||
{
|
|
||||||
status = -EINVAL;
|
status = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user