Add patches with upstream fixes
This commit is contained in:
parent
87befbd9c8
commit
e6ffee77b6
39
0001-gui-wizard-gtk-wizard-Remove-variable.patch
Normal file
39
0001-gui-wizard-gtk-wizard-Remove-variable.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 1c646a2948d287368ec1a82b444e8175ebfbf5b9 Mon Sep 17 00:00:00 2001
|
||||
From: Ernestas Kulik <ekulik@redhat.com>
|
||||
Date: Tue, 25 Aug 2020 15:05:31 +0300
|
||||
Subject: [PATCH] gui-wizard-gtk: wizard: Remove variable
|
||||
|
||||
cmd_output is no longer used since
|
||||
440bcfa8526d50f122ec14e19f2bf2aa336f61e7 and trying to call
|
||||
g_string_free() on it results in a critical warning.
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 44900448..a4d7caa0 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -231,8 +231,6 @@ typedef struct
|
||||
|
||||
static page_obj_t pages[NUM_PAGES];
|
||||
|
||||
-static GString *cmd_output = NULL;
|
||||
-
|
||||
/* Utility functions */
|
||||
|
||||
static void clear_warnings(void);
|
||||
@@ -1667,10 +1665,6 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
|
||||
log_notice("done running event on '%s': %d", g_dump_dir_name, retval);
|
||||
append_to_textview(g_tv_event_log, "\n");
|
||||
|
||||
- /* Free child output buffer */
|
||||
- g_string_free(cmd_output, TRUE);
|
||||
- cmd_output = NULL;
|
||||
-
|
||||
/* Hide spinner and stop btn */
|
||||
gtk_widget_hide(GTK_WIDGET(g_spinner_event_log));
|
||||
gtk_widget_hide(g_btn_stop);
|
||||
--
|
||||
2.28.0
|
||||
|
49
0002-gui-wizard-gtk-wizard-Fix-invalid-memory-read.patch
Normal file
49
0002-gui-wizard-gtk-wizard-Fix-invalid-memory-read.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 85b687098bcedb67285ab787b8bd506d328c34e0 Mon Sep 17 00:00:00 2001
|
||||
From: Ernestas Kulik <ekulik@redhat.com>
|
||||
Date: Tue, 25 Aug 2020 15:17:54 +0300
|
||||
Subject: [PATCH] gui-wizard-gtk: wizard: Fix invalid memory read
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This partially reverts 7aba6e53bbfeedaacd95bbaa5e0c5e325a3e6a8d, which
|
||||
results in “event” being inappropriately freed before a “goto” statement
|
||||
is executed and the value stored in “g_event_selected” is read.
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index a4d7caa0..3e69a513 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2635,7 +2635,7 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
log_info("%s: Looking for next event to process", __func__);
|
||||
/* (note: this frees and sets to NULL g_event_selected) */
|
||||
- g_autofree char *event = setup_next_processed_event(&g_auto_event_list);
|
||||
+ char *event = setup_next_processed_event(&g_auto_event_list);
|
||||
if (!event)
|
||||
{
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
@@ -2644,6 +2644,8 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
if (!get_sensitive_data_permission(event))
|
||||
{
|
||||
+ free(event);
|
||||
+
|
||||
cancel_processing(g_lbl_event_log, /* default message */ NULL, TERMINATE_NOFLAGS);
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
goto again;
|
||||
@@ -2659,6 +2661,8 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
if (libreport_get_global_stop_on_not_reportable())
|
||||
{
|
||||
+ free(event);
|
||||
+
|
||||
cancel_processing(g_lbl_event_log, msg, TERMINATE_NOFLAGS);
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
goto again;
|
||||
--
|
||||
2.28.0
|
||||
|
@ -15,13 +15,15 @@
|
||||
Summary: Generic library for reporting various problems
|
||||
Name: libreport
|
||||
Version: 2.14.0
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://abrt.readthedocs.org/
|
||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-gui-wizard-gtk-Fix-a-double-free-condition.patch
|
||||
Patch1: 0002-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch
|
||||
Patch0: 0001-gui-wizard-gtk-wizard-Remove-variable.patch
|
||||
Patch1: 0002-gui-wizard-gtk-wizard-Fix-invalid-memory-read.patch
|
||||
Patch2: 0003-gui-wizard-gtk-Fix-a-double-free-condition.patch
|
||||
Patch3: 0004-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch
|
||||
|
||||
BuildRequires: %{dbus_devel}
|
||||
BuildRequires: gtk3-devel
|
||||
@ -662,6 +664,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Sep 27 2020 Matěj Grabovský <mgrabovs@redhat.com> - 2.14.0-9
|
||||
- Add upstream fixes for memory management
|
||||
|
||||
* Sun Sep 27 2020 Matěj Grabovský <mgrabovs@redhat.com> - 2.14.0-8
|
||||
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1882950
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user