From b2145a4004cd6005297181b371fc51b8fbf391ec Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 16 Apr 2020 20:16:02 -0400 Subject: [PATCH] ospfd: Fix possible null deref It is possible that area is null, let's ensure it isn't. Signed-off-by: Donald Sharp --- ospfd/ospf_snmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 550e5ee9ee..63191d5cb5 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -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; -- 2.39.5