Add patch for #1882328
This commit is contained in:
parent
11466005e0
commit
aa4f8872d7
34
0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch
Normal file
34
0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 9b6d40905c21b476c58e9f9a908ddb32a0a56a18 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||||
|
Date: Tue, 29 Sep 2020 19:14:05 +0200
|
||||||
|
Subject: [PATCH] gui-wizard-gtk: Don't autofree URL string
|
||||||
|
|
||||||
|
g_object_set_data() does not (and cannot) copy the data passed to it, so
|
||||||
|
once url is freed, a subsequent access to the 'url' tag leads to an
|
||||||
|
invalid read and segfault.
|
||||||
|
|
||||||
|
Bug was introduced in df386b097.
|
||||||
|
|
||||||
|
Resolves rhbz#1882328
|
||||||
|
---
|
||||||
|
src/gui-wizard-gtk/wizard.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||||
|
index 0af19587..ba1998df 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.c
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.c
|
||||||
|
@@ -462,8 +462,8 @@ static void append_to_textview(GtkTextView *tv, const char *str)
|
||||||
|
GtkTextTag *tag;
|
||||||
|
tag = gtk_text_buffer_create_tag(tb, NULL, "foreground", "blue",
|
||||||
|
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||||
|
- g_autofree char *url = g_strndup(t->start, t->len);
|
||||||
|
- g_object_set_data(G_OBJECT(tag), "url", url);
|
||||||
|
+ char *url = g_strndup(t->start, t->len);
|
||||||
|
+ g_object_set_data_full(G_OBJECT(tag), "url", url, g_free);
|
||||||
|
|
||||||
|
gtk_text_buffer_insert_with_tags(tb, &text_iter, url, -1, tag, NULL);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
Summary: Generic library for reporting various problems
|
Summary: Generic library for reporting various problems
|
||||||
Name: libreport
|
Name: libreport
|
||||||
Version: 2.14.0
|
Version: 2.14.0
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://abrt.readthedocs.org/
|
URL: https://abrt.readthedocs.org/
|
||||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
@ -26,6 +26,7 @@ Patch2: 0003-gui-wizard-gtk-Fix-a-double-free-condition.patch
|
|||||||
Patch3: 0004-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch
|
Patch3: 0004-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch
|
||||||
Patch4: 0005-gui-wizard-gtk-Fix-segfault.patch
|
Patch4: 0005-gui-wizard-gtk-Fix-segfault.patch
|
||||||
Patch5: 0006-event_config-Null-autofree-pointers-before-returning.patch
|
Patch5: 0006-event_config-Null-autofree-pointers-before-returning.patch
|
||||||
|
Patch6: 0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch
|
||||||
|
|
||||||
BuildRequires: %{dbus_devel}
|
BuildRequires: %{dbus_devel}
|
||||||
BuildRequires: gtk3-devel
|
BuildRequires: gtk3-devel
|
||||||
@ -666,6 +667,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 09 2020 Matěj Grabovský <mgrabovs@redhat.com> - 2.14.0-11
|
||||||
|
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1882328
|
||||||
|
|
||||||
* Tue Sep 29 2020 Matěj Grabovský <mgrabovs@redhat.com> - 2.14.0-10
|
* Tue Sep 29 2020 Matěj Grabovský <mgrabovs@redhat.com> - 2.14.0-10
|
||||||
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883337
|
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883337
|
||||||
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883410
|
- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883410
|
||||||
|
Loading…
Reference in New Issue
Block a user