From 8c85c85d483bb1b8d820aab1b41d55a548b06278 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Nov 11 2019 10:40:03 +0000 Subject: Add patch to fix a double-free https://github.com/abrt/libreport/commit/36c5e90469b36cb0724f45447ae923a6d6ccf348 Signed-off-by: Ernestas Kulik --- diff --git a/0001-gtk-Fix-another-possible-double-free.patch b/0001-gtk-Fix-another-possible-double-free.patch new file mode 100644 index 0000000..2bd966d --- /dev/null +++ b/0001-gtk-Fix-another-possible-double-free.patch @@ -0,0 +1,38 @@ +From 36c5e90469b36cb0724f45447ae923a6d6ccf348 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= +Date: Fri, 25 Oct 2019 12:37:44 +0200 +Subject: [PATCH] gtk: Fix another possible double-free + +The object should only be freed if we're in the cleanup phase, i.e. only +in the if-branch of the condition. + +This one was introduced in dc281652. +--- + src/gui-wizard-gtk/wizard.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c +index 4b840bac..ec8bb68b 100644 +--- a/src/gui-wizard-gtk/wizard.c ++++ b/src/gui-wizard-gtk/wizard.c +@@ -2518,7 +2518,7 @@ static bool highligh_words_in_textview(int page, GtkTextView *tev, GList *words, + while (valid) + { + g_autofree char *text = NULL; +- g_autofree search_item_t *word = NULL; ++ search_item_t *word = NULL; + + gtk_tree_model_get(GTK_TREE_MODEL(g_ls_sensitive_list), &iter, + SEARCH_COLUMN_TEXT, &text, +@@ -2533,6 +2533,8 @@ static bool highligh_words_in_textview(int page, GtkTextView *tev, GList *words, + + if (word == g_current_highlighted_word) + g_current_highlighted_word = NULL; ++ ++ free(word); + } + else + { +-- +2.23.0 + diff --git a/libreport.spec b/libreport.spec index b905057..092e5f3 100644 --- a/libreport.spec +++ b/libreport.spec @@ -15,7 +15,7 @@ Summary: Generic library for reporting various problems Name: libreport Version: 2.11.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -63,6 +63,8 @@ Requires: lz4 BuildRequires: sed %endif +Patch0: 0001-gtk-Fix-another-possible-double-free.patch + %description Libraries providing API for reporting different problems in applications to different bug targets like Bugzilla, ftp, trac, etc... @@ -749,6 +751,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Mon Nov 11 2019 Ernestas Kulik - 2.11.2-2 +- Add patch to fix a double-free + * Wed Oct 23 2019 Matěj Grabovský 2.11.2-1 - gtk: Improve memory management - gtk: Prevent memory leak