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

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