2 # netsnmp_access_ipaddress_container_load() can return NULL.
3 # ipaddressTable_container_load() should check for the validity
4 # of return value before accessing it or else it causes SEGV.
6 # Developed in-house. Bug submitted upstream
7 # https://sourceforge.net/p/net-snmp/bugs/2589
9 --- net-snmp-5.9.4/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c.orig
10 +++ net-snmp-5.9.4/agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable_data_access.c
12 * missing addresses to be deleted. Also, prune interfaces in
13 * ipaddress_container, so only the new interfaces remain.
15 + if(ipaddress_container != NULL)
17 tmp_ptr[0] = ipaddress_container->next;
18 tmp_ptr[1] = NULL; /* list of interfaces to be removed from 'container' */
19 tmp_ptr[2] = NULL; /* list of interfaces to be ignored in ipaddress_container */
22 CONTAINER_FREE(to_ignore);
26 DEBUGMSGT(("verbose:ipAddressTable:ipAddressTable_cache_load",
27 "%lu records\n", (unsigned long)CONTAINER_SIZE(container)));