Skip to content

Commit

Permalink
ewrk3: range checking problem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Mar 23, 2010
1 parent ecbacf8 commit 664ffe8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ewrk3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 664ffe8

Please sign in to comment.