doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

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

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