提交 5b3e7e6c 编写于 作者: D Dan Carpenter 提交者: David S. Miller

openvswitch: potential NULL deref in sample()

If there is no OVS_SAMPLE_ATTR_ACTIONS set then "acts_list" is NULL and
it leads to a NULL dereference when we call nla_len(acts_list).  This
is a static checker fix, not something I have seen in testing.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 563d34d0
......@@ -325,6 +325,9 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
}
}
if (!acts_list)
return 0;
return do_execute_actions(dp, skb, nla_data(acts_list),
nla_len(acts_list), true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册