Blame SOURCES/0015-libnm-crash-vpn-service-types-rh1374526

a85faa
From cecdf233da4ebb1006a635e19018ded22d892914 Mon Sep 17 00:00:00 2001
a85faa
From: Thomas Haller <thaller@redhat.com>
a85faa
Date: Fri, 9 Sep 2016 01:11:53 +0200
a85faa
Subject: [PATCH 1/1] libnm-core: fix crash in
a85faa
 nm_vpn_plugin_info_list_get_service_types()
a85faa
a85faa
Coverity says, "Dereference after null check". Indeed, @aliases
a85faa
is usually NULL.
a85faa
a85faa
Fixes: 46665898bbe2c0998529cb75056d674654ba41a9
a85faa
(cherry picked from commit 9cf9c3a88ed896df9133d41bac7065069bf49909)
a85faa
(cherry picked from commit 4a535e6213bb5de05f166c29debc65fc04a7a3b8)
a85faa
---
a85faa
 libnm-core/nm-vpn-plugin-info.c | 2 +-
a85faa
 1 file changed, 1 insertion(+), 1 deletion(-)
a85faa
a85faa
diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c
a85faa
index a472761..d3bc489 100644
a85faa
--- a/libnm-core/nm-vpn-plugin-info.c
a85faa
+++ b/libnm-core/nm-vpn-plugin-info.c
a85faa
@@ -738,7 +738,7 @@ nm_vpn_plugin_info_list_get_service_types (GSList *list,
a85faa
 			n = _service_type_get_default_abbreviation (priv->service);
a85faa
 			if (n)
a85faa
 				g_ptr_array_add (l, g_strdup (n));
a85faa
-			for (i = 0; priv->aliases[i]; i++) {
a85faa
+			for (i = 0; priv->aliases && priv->aliases[i]; i++) {
a85faa
 				n = _service_type_get_default_abbreviation (priv->aliases[i]);
a85faa
 				if (n)
a85faa
 					g_ptr_array_add (l, g_strdup (n));
a85faa
-- 
a85faa
2.7.4
a85faa