From: Ben Pfaff Date: Tue, 17 May 2011 20:41:32 +0000 (-0700) Subject: ofproto-dpif: Fix null pointer dereference in is_admissible(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23adee4206a98975750a076f9298541868c7c504;p=openvswitch ofproto-dpif: Fix null pointer dereference in is_admissible(). If in_port is NULL then we must not dereference it. --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b7194930..82bb0e0c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3526,7 +3526,7 @@ is_admissible(struct ofproto_dpif *ofproto, const struct flow *flow, /* Find the port and bundle for the received packet. */ in_port = get_ofp_port(ofproto, flow->in_port); - *in_bundlep = in_bundle = in_port->bundle; + *in_bundlep = in_bundle = in_port ? in_port->bundle : NULL; if (!in_port || !in_bundle) { /* No interface? Something fishy... */ if (have_packet) {