From 71c8c2e5872d2c6b15e24d37d3c000c11d0eba07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 1 Sep 2015 16:06:54 +0200 Subject: [PATCH] libnm-core: fix a crash in priority_strv_to_maplist() strv can be NULL. Reproducer: $ nmcli con mod my-vlan vlan.ingress 1:5 --- libnm-core/nm-setting-vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c index 554d9ddc47..382c32606e 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -564,7 +564,7 @@ priority_strv_to_maplist (NMVlanPriorityMap map, char **strv) GSList *list = NULL; int i; - for (i = 0; strv[i]; i++) { + for (i = 0; strv && strv[i]; i++) { PriorityMap *item; item = priority_map_new_from_str (map, strv[i]);