diff options
author | Thomas Haller <thaller@redhat.com> | 2016-09-09 01:11:53 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-09-09 01:23:11 +0200 |
commit | 9cf9c3a88ed896df9133d41bac7065069bf49909 (patch) | |
tree | 3e081205a5c55556f149ffa832233cb4dde8e257 | |
parent | 8bae6e588ff006eda9ee326026eec08c8bb73f6f (diff) | |
download | NetworkManager-9cf9c3a88ed896df9133d41bac7065069bf49909.tar.gz |
libnm-core: fix crash in nm_vpn_plugin_info_list_get_service_types()
Coverity says, "Dereference after null check". Indeed, @aliases
is usually NULL.
Fixes: 46665898bbe2c0998529cb75056d674654ba41a9
-rw-r--r-- | libnm-core/nm-vpn-plugin-info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c index a4727619ee..d3bc4893aa 100644 --- a/libnm-core/nm-vpn-plugin-info.c +++ b/libnm-core/nm-vpn-plugin-info.c @@ -738,7 +738,7 @@ nm_vpn_plugin_info_list_get_service_types (GSList *list, n = _service_type_get_default_abbreviation (priv->service); if (n) g_ptr_array_add (l, g_strdup (n)); - for (i = 0; priv->aliases[i]; i++) { + for (i = 0; priv->aliases && priv->aliases[i]; i++) { n = _service_type_get_default_abbreviation (priv->aliases[i]); if (n) g_ptr_array_add (l, g_strdup (n)); |