NetworkManager/nmcli-crash-vlan-priorities.patch
2015-10-19 13:43:23 +02:00

36 lines
1.0 KiB
Diff

From 7cfd6fc64185bebb09274107d64e65df748b149e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
Date: Tue, 1 Sep 2015 16:06:54 +0200
Subject: [PATCH] libnm-core: fix a crash in priority_strv_to_maplist()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
strv can be NULL.
Reproducer:
$ nmcli con mod my-vlan vlan.ingress 1:5
(cherry picked from commit 71c8c2e5872d2c6b15e24d37d3c000c11d0eba07)
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
---
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 859eb13..cbc85b3 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]);
--
2.1.0