Blame SOURCES/net-snmp-5.7.2-strstr.patch

b5ae06
diff -urNp old/agent/mibgroup/host/data_access/swinst_rpm.c new/agent/mibgroup/host/data_access/swinst_rpm.c
b5ae06
--- old/agent/mibgroup/host/data_access/swinst_rpm.c	2012-10-10 00:28:58.000000000 +0200
b5ae06
+++ new/agent/mibgroup/host/data_access/swinst_rpm.c	2017-03-23 13:39:44.695386498 +0100
b5ae06
@@ -129,7 +129,7 @@ netsnmp_swinst_arch_load( netsnmp_contai
b5ae06
                                       "%s-%s-%s", n, v, r);
b5ae06
         if (entry->swName_len > sizeof(entry->swName))
b5ae06
             entry->swName_len = sizeof(entry->swName);
b5ae06
-        entry->swType = (NULL != strstr( g, "System Environment"))
b5ae06
+        entry->swType = (g != NULL && NULL != strstr( g, "System Environment"))
b5ae06
                         ? 2      /* operatingSystem */
b5ae06
                         : 4;     /*  application    */
b5ae06
 
b5ae06