[easytag/epel7] Add fix for crash when browsing hidden directories
David King
amigadave at fedoraproject.org
Mon May 19 11:05:40 UTC 2014
commit f9d640e3bec426c53e61c0bd967c9f7c99ebf294
Author: David King <amigadave at amigadave.com>
Date: Sun May 18 14:41:26 2014 +0100
Add fix for crash when browsing hidden directories
easytag-2.2.2-avoid-hidden-directory-crash.patch | 45 ++++++++++++++++++++++
easytag.spec | 7 +++-
2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/easytag-2.2.2-avoid-hidden-directory-crash.patch b/easytag-2.2.2-avoid-hidden-directory-crash.patch
new file mode 100644
index 0000000..fc9361b
--- /dev/null
+++ b/easytag-2.2.2-avoid-hidden-directory-crash.patch
@@ -0,0 +1,45 @@
+From b60e4ac08252861be1f25517094ea49b8f3e7bb8 Mon Sep 17 00:00:00 2001
+From: David King <amigadave at amigadave.com>
+Date: Sun, 18 May 2014 14:24:45 +0100
+Subject: Avoid a crash when browsing hidden directories
+
+If viewing hidden directories is disabled, EasyTAG will fail to find a
+hidden path in the directory model, and will crash when trying to
+retrieve the full path from the model. Avoid this by returning early
+from Browser_Tree_Select_Dir().
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730326
+
+diff --git a/src/browser.c b/src/browser.c
+index f80d90c..3027ec5 100644
+--- a/src/browser.c
++++ b/src/browser.c
+@@ -915,6 +915,7 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
+ g_object_unref (file);
+ g_free (path);
+ }
++
+ do
+ {
+ gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), ¤tNode,
+@@ -931,7 +932,16 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
+ break;
+ }
+ g_free(nodeName);
+- } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(directoryTreeModel), ¤tNode));
++
++ if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (directoryTreeModel),
++ ¤tNode))
++ {
++ /* Path was not found in tree, such as when a hidden path was
++ * passed in, but hidden paths are set to not be displayed. */
++ g_strfreev (parts);
++ return FALSE;
++ }
++ } while (1);
+
+ parentNode = currentNode;
+ rootPath = gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &parentNode);
+--
+cgit v0.10.1
+
diff --git a/easytag.spec b/easytag.spec
index 719e719..c4f420d 100644
--- a/easytag.spec
+++ b/easytag.spec
@@ -2,7 +2,7 @@
Name: easytag
Version: 2.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Tag editor for MP3, Ogg, FLAC and other music files
Group: Applications/Multimedia
@@ -10,6 +10,7 @@ Group: Applications/Multimedia
License: GPLv2+ and LGPLv2+
URL: https://wiki.gnome.org/Apps/EasyTAG
Source: https://download.gnome.org/sources/easytag/2.2/easytag-%{version}.tar.xz
+Patch0: easytag-2.2.2-avoid-hidden-directory-crash.patch
BuildRequires: desktop-file-utils
BuildRequires: docbook-dtds
@@ -35,6 +36,7 @@ MP2, FLAC, Ogg Opus, Ogg Speex, Ogg Vorbis, MusePack and Monkey's Audio files.
%prep
%setup -q
+%patch0 -p1
%build
@@ -76,6 +78,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Sun May 18 2014 David King <amigadave at amigadave.com> 2.2.2-2
+- Add fix for crash when browsing hidden directories
+
* Fri May 09 2014 David King <amigadave at amigadave.com> 2.2.2-1
- Update to 2.2.2
More information about the scm-commits
mailing list