Blame SOURCES/0138-dd-add-missing-return-statement.patch

5f7b57
From 82bea520c7c037f861cf27859a194bb64559f835 Mon Sep 17 00:00:00 2001
5f7b57
From: Jakub Filak <jfilak@redhat.com>
5f7b57
Date: Sat, 23 May 2015 01:10:16 +0200
5f7b57
Subject: [LIBREPORT PATCH] dd: add missing return statement
5f7b57
5f7b57
The missing return allows abrt-dbus to read any file on system
5f7b57
(absolute paths do not work because of an assert but relative paths
5f7b57
 allow an attacker to read everything).
5f7b57
5f7b57
Related: #1217484
5f7b57
5f7b57
Signed-off-by: Jakub Filak <jfilak@redhat.com>
5f7b57
---
5f7b57
 src/lib/dump_dir.c | 6 ++++--
5f7b57
 1 file changed, 4 insertions(+), 2 deletions(-)
5f7b57
5f7b57
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
5f7b57
index 32f498b..796f947 100644
5f7b57
--- a/src/lib/dump_dir.c
5f7b57
+++ b/src/lib/dump_dir.c
5f7b57
@@ -1153,8 +1153,10 @@ char* dd_load_text_ext(const struct dump_dir *dd, const char *name, unsigned fla
5f7b57
     if (!str_is_correct_filename(name))
5f7b57
     {
5f7b57
         error_msg("Cannot load text. '%s' is not a valid file name", name);
5f7b57
-        if (!(flags & DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE))
5f7b57
-            xfunc_die();
5f7b57
+        if ((flags & DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE))
5f7b57
+            return NULL;
5f7b57
+
5f7b57
+        xfunc_die();
5f7b57
     }
5f7b57
 
5f7b57
     /* Compat with old abrt dumps. Remove in abrt-2.1 */
5f7b57
-- 
5f7b57
1.8.3.1
5f7b57