Skip to contentSkip to conversation

ewrk3: range checking problem

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 22, 2010 – Mar 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ewrk3: range checking problem

The range checking here is wrong. It should be HASH_TABLE_LEN which is 512.

drivers/net/ewrk3.c +1 -2
index 91e59f3..ae02de1 100644
@@ -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;
 			}