From 7cfd6fc64185bebb09274107d64e65df748b149e 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 (cherry picked from commit 71c8c2e5872d2c6b15e24d37d3c000c11d0eba07) --- 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 859eb13b47..cbc85b3e45 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -565,7 +565,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]);