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

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