Blame SOURCES/0310-a-a-s-p-data-fix-segfault-if-GPGKeysDir-isn-t-config.patch

06486d
From c306d5e8681990f2aa9a56bca2866bd47d1c784f Mon Sep 17 00:00:00 2001
06486d
From: Jakub Filak <jfilak@redhat.com>
06486d
Date: Tue, 10 Nov 2015 13:22:21 +0100
06486d
Subject: [PATCH] a-a-s-p-data: fix segfault if GPGKeysDir isn't configured
06486d
06486d
Related to #1591141
06486d
06486d
Signed-off-by: Jakub Filak <jfilak@redhat.com>
06486d
---
06486d
 src/daemon/abrt-action-save-package-data.c | 2 +-
06486d
 1 file changed, 1 insertion(+), 1 deletion(-)
06486d
06486d
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
06486d
index ef2007ee..ef492c28 100644
06486d
--- a/src/daemon/abrt-action-save-package-data.c
06486d
+++ b/src/daemon/abrt-action-save-package-data.c
06486d
@@ -88,7 +88,7 @@ static void load_gpg_keys(void)
06486d
     }
06486d
 
06486d
     const char *gpg_keys_dir = get_map_string_item_or_NULL(settings, "GPGKeysDir");
06486d
-    if (strcmp(gpg_keys_dir, "") != 0)
06486d
+    if (gpg_keys_dir != NULL && strcmp(gpg_keys_dir, "") != 0)
06486d
     {
06486d
         log_debug("Reading gpg keys from '%s'", gpg_keys_dir);
06486d
         GList *gpg_files = get_file_list(gpg_keys_dir, NULL /* we don't care about the file ext */);
06486d
-- 
06486d
2.17.1
06486d