From 8ef3319e461509972bdd5fbe08c4265cb48b42a0 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 14 Apr 2014 14:46:25 +0200 Subject: [PATCH] Don't crash when trying to save a copy Resolves: #1086944 --- ...n-t-crash-when-trying-to-save-a-copy.patch | 48 +++++++++++++++++++ evince.spec | 8 +++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch diff --git a/0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch b/0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch new file mode 100644 index 0000000..037fe02 --- /dev/null +++ b/0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch @@ -0,0 +1,48 @@ +From 5ab6037b0f0d875b11ad1237b33a35223c3a8220 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Thu, 3 Apr 2014 13:43:54 +0200 +Subject: [PATCH] ev-window: Don't crash when trying to save a copy + +We can not free both folder_uri and parent_uri. If parent_uri is +non-NULL then it will point to the same location as folder_uri. +Also, parent_uri is now unused so we can just remove it. + +Fallout from 41ce0e16cc3f395766abb239f990dd98c3144001 + +https://bugzilla.gnome.org/show_bug.cgi?id=727536 +--- + shell/ev-window.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/shell/ev-window.c b/shell/ev-window.c +index 978c55f..faa8045 100644 +--- a/shell/ev-window.c ++++ b/shell/ev-window.c +@@ -2428,7 +2428,6 @@ ev_window_file_chooser_restore_folder (EvWindow *window, + { + const gchar *dir; + gchar *folder_uri; +- gchar *parent_uri = NULL; + + g_settings_get (ev_window_ensure_settings (window), + get_settings_key_for_directory (directory), +@@ -2440,7 +2439,7 @@ ev_window_file_chooser_restore_folder (EvWindow *window, + parent = g_file_get_parent (file); + g_object_unref (file); + if (parent) { +- folder_uri = parent_uri = g_file_get_uri (parent); ++ folder_uri = g_file_get_uri (parent); + g_object_unref (parent); + } + } +@@ -2454,7 +2453,6 @@ ev_window_file_chooser_restore_folder (EvWindow *window, + } + + g_free (folder_uri); +- g_free (parent_uri); + } + + static void +-- +1.9.0 + diff --git a/evince.spec b/evince.spec index 6f246e9..0593587 100644 --- a/evince.spec +++ b/evince.spec @@ -5,13 +5,14 @@ Name: evince Version: 3.12.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse Group: Applications/Publishing URL: http://projects.gnome.org/evince/ Source0: http://download.gnome.org/sources/%{name}/3.12/%{name}-%{version}.tar.xz +Patch0: 0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch BuildRequires: gtk3-devel BuildRequires: glib2-devel >= %{glib2_version} @@ -106,6 +107,7 @@ It adds an additional tab called "Document" to the file properties dialog. %prep %setup -q +%patch0 -p1 -b .save-copy %build ./autogen.sh @@ -216,6 +218,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||: %{_libdir}/nautilus/extensions-3.0/libevince-properties-page.so %changelog +* Mon Apr 14 2014 Marek Kasik - 3.12.0-2 +- Don't crash when trying to save a copy +- Resolves: #1086944 + * Tue Mar 25 2014 Kalev Lember - 3.12.0-1 - Update to 3.12.0