⬢ DragonFlyBSD Kernel Audit
DF-3543 / fix.diff
← back to finding ↓ download raw
--- a/sys/netgraph/one2many/ng_one2many.c
+++ b/sys/netgraph/one2many/ng_one2many.c
@@ -336,7 +336,7 @@ ng_one2many_rcvmsg(node_p node, struct ng_mesg *msg,
 			linkNum = *((int32_t *)msg->data);
 			if (linkNum == NG_ONE2MANY_ONE_LINKNUM)
 				link = &priv->one;
-			else if (linkNum == 0
+			else if (linkNum >= 0
 			    && linkNum < NG_ONE2MANY_MAX_LINKS) {
 				link = &priv->many[linkNum];
 			} else {