From 97263ba2b6685de4f63740e59ce5670345802409 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Oct 04 2018 18:29:40 +0000 Subject: prevent segfault on certain drag-and-drop actions Resolves: #1635869 --- diff --git a/xarchiver-0.5.4-dnd-segfault.patch b/xarchiver-0.5.4-dnd-segfault.patch new file mode 100644 index 0000000..7d4fba1 --- /dev/null +++ b/xarchiver-0.5.4-dnd-segfault.patch @@ -0,0 +1,32 @@ +From 43896debcea363d7dfa17290e9ed8462af0375a3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= +Date: Mon, 22 Jun 2015 14:18:25 +0200 +Subject: [PATCH] Check XdndDirectSave property received from destination + +According to the Direct Save Protocol (XDS) specifications +the destination shall convert the XdndDirectSave property +to a URL. + +Check whether this has happened to avoid a segmentation fault. + +Reported by vincent-t on github. +--- + src/window.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/window.c b/src/window.c +index 5ba616e..7bd6cbb 100644 +--- a/src/window.c ++++ b/src/window.c +@@ -1718,6 +1718,8 @@ void drag_data_get (GtkWidget *widget,GdkDragContext *dc,GtkSelectionData *selec + destination = g_filename_from_uri((gchar*)_destination,NULL,NULL); + g_free(_destination); + ++ if (!destination) return; ++ + archive->extraction_path = xa_remove_level_from_path (destination); + g_free(destination); + +-- +2.19.0 + diff --git a/xarchiver.spec b/xarchiver.spec index f33a673..3d06536 100644 --- a/xarchiver.spec +++ b/xarchiver.spec @@ -1,6 +1,6 @@ Name: xarchiver Version: 0.5.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Archive manager for Xfce Group: Applications/Archiving @@ -9,6 +9,8 @@ URL: http://xarchiver.xfce.org/ Source0: http://downloads.sourceforge.net/xarchiver/xarchiver-%{version}.tar.bz2 Patch0: xarchiver-0.5.4-version-fix.patch +# from github.com/ib/xarchiver/commit/43896debcea363d7dfa17290e9ed8462af0375a3 +Patch1: xarchiver-0.5.4-dnd-segfault.patch BuildRequires: gtk2-devel, libxml2-devel, gettext, desktop-file-utils BuildRequires: xfce4-dev-tools >= 4.3.90.2 @@ -29,6 +31,7 @@ archives in the arj, 7z, rar, and zip formats are supported. %prep %setup -q %patch0 -p1 +%patch1 -p1 # fix spurious executable permissions of some debug files chmod -x src/mime.* @@ -98,6 +101,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Oct 04 2018 Niels de Vos - 0.5.4-9 +- prevent segfault on certain drag-and-drop actions (#1635869) + * Sat Jul 14 2018 Fedora Release Engineering - 0.5.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild