On Sat, Oct 28, 2017 at 10:31:49AM -0700, William Tu wrote: > Clang reports possible null pointer in_dhcp_opt passing to memcmp. > This might due to dp_packet_get_udp_payload retuning null. Fix it > by adding ovs_assert. > > Signed-off-by: William Tu <[email protected]> > --- > ovn/controller/pinctrl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c > index 469a35586b8a..3fdd01182a52 100644 > --- a/ovn/controller/pinctrl.c > +++ b/ovn/controller/pinctrl.c > @@ -270,6 +270,7 @@ pinctrl_handle_put_dhcp_opts( > sizeof (struct dhcp_header); > > ovs_be32 magic_cookie = htonl(DHCP_MAGIC_COOKIE); > + ovs_assert(in_dhcp_opt);
I don't see how this makes sense. in_dhcp_opt is a pointer plus a nonzero constant. That's only null if it wraps around. I don't want to "fix" this one. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
