From b99b632b473cf9d1058c472347d2714684e4f53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 18 Sep 2014 12:45:30 +0200 Subject: [PATCH] libnm-core: fix crash while converting permissions to list Accept NULL as equivalent to a 0-length array from set_property(). --- libnm-core/nm-setting-connection.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index 403c03653..200b9a7cd 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -1051,6 +1051,9 @@ perm_strv_to_permlist (char **strv) GSList *list = NULL; int i; + if (!strv) + return NULL; + for (i = 0; strv[i]; i++) { Permission *p;