Blame SOURCES/0093-lib-process-NULL-arg-as-an-empty-list-in-parse_list.patch

4b6aa8
From 3fbf503887d6f81b8e05bd9ff09f3f205c6f4eae Mon Sep 17 00:00:00 2001
4b6aa8
From: Jakub Filak <jfilak@redhat.com>
4b6aa8
Date: Thu, 2 Oct 2014 10:36:25 +0200
4b6aa8
Subject: [LIBREPORT PATCH 93/93] lib: process NULL arg as an empty list in
4b6aa8
 parse_list()
4b6aa8
4b6aa8
NULL CSV string means empty list
4b6aa8
4b6aa8
Related to rhbz#1139987
4b6aa8
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
---
4b6aa8
 src/lib/glib_support.c | 3 +++
4b6aa8
 1 file changed, 3 insertions(+)
4b6aa8
4b6aa8
diff --git a/src/lib/glib_support.c b/src/lib/glib_support.c
4b6aa8
index d98c690..6276e9d 100644
4b6aa8
--- a/src/lib/glib_support.c
4b6aa8
+++ b/src/lib/glib_support.c
4b6aa8
@@ -60,6 +60,9 @@ void glib_init(void)
4b6aa8
  */
4b6aa8
 GList *parse_list(const char* list)
4b6aa8
 {
4b6aa8
+    if (list == NULL)
4b6aa8
+        return NULL;
4b6aa8
+
4b6aa8
     GList *l = NULL;
4b6aa8
 
4b6aa8
     char *saved_ptr = NULL;
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8