]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: Fix possible null deref
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 17 Apr 2020 00:16:02 +0000 (20:16 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 17 Apr 2020 00:16:02 +0000 (20:16 -0400)
It is possible that area is null, let's ensure it isn't.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_snmp.c

index 550e5ee9ee20d07f04c8b284ff56ca5e8ebb6435..63191d5cb58ac7619f25b7bb4bb8ca6821815dda 100644 (file)
@@ -784,7 +784,7 @@ static struct ospf_area *ospfStubAreaLookup(struct variable *v, oid name[],
 
                area = ospf_area_lookup_by_area_id(ospf, *addr);
 
-               if (area->external_routing == OSPF_AREA_STUB)
+               if (area && area->external_routing == OSPF_AREA_STUB)
                        return area;
                else
                        return NULL;