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

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