Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 20ea82921fd47275cb326de7c32be0cd > files > 1

gliv-1.9.7-8.fc18.src.rpm

From c5de0d539cfbef98656204459ff1efd839071542 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 21 Jul 2013 18:43:26 +0400
Subject: [PATCH 1/1] Something is always bigger than nothing (NULL)

https://bugzilla.redhat.com/865114

Backtrace:

https://bugzilla.redhat.com/attachment.cgi?id=625155

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
 src/files_list.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/files_list.c b/src/files_list.c
index f0ff8fe..60fd15e 100644
--- a/src/files_list.c
+++ b/src/files_list.c
@@ -304,6 +304,10 @@ G_GNUC_PURE static gint filename_compar(gconstpointer a, gconstpointer b)
     ptr1 = (const gchar *) a;
     ptr2 = (const gchar *) b;
 
+    /* Something is always bigger than nothing (NULL) */
+    if (ptr1 && !ptr2)
+	    return 1;
+
     if (ptr1[0] != ptr2[0])
         /* Comparing an absolute filename, and a relative one. */
         return ptr1[0] == '/' ? -1 : 1;
-- 
1.8.3.1