[geeqie] patch filedata.c for sidecars case-insensitive fs crash bz 632243
Michael Schwendt
mschwendt at fedoraproject.org
Sat Mar 5 10:13:57 UTC 2011
commit 071762ddcfd0ecc666ccbcc4f6f4dab8d192b97f
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Sat Mar 5 11:13:48 2011 +0100
patch filedata.c for sidecars case-insensitive fs crash bz 632243
geeqie-1.0-sidecars-case.patch | 26 ++++++++++++++++++++++++++
geeqie.spec | 15 ++++++++++++++-
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/geeqie-1.0-sidecars-case.patch b/geeqie-1.0-sidecars-case.patch
new file mode 100644
index 0000000..0010757
--- /dev/null
+++ b/geeqie-1.0-sidecars-case.patch
@@ -0,0 +1,26 @@
+diff -Nur geeqie-1.0-orig/src/filedata.c geeqie-1.0/src/filedata.c
+--- geeqie-1.0-orig/src/filedata.c 2010-02-17 22:21:19.000000000 +0100
++++ geeqie-1.0/src/filedata.c 2011-03-05 11:07:17.329682947 +0100
+@@ -489,6 +489,7 @@
+ if (stat(sl, &st) == 0)
+ {
+ list = g_list_prepend(list, file_data_new_local(sl, &st, FALSE, FALSE));
++ break; /* don't take multiple combinations because of case-insensitive filesystems */
+ }
+ }
+ }
+@@ -535,11 +536,14 @@
+
+ if (!basename_hash)
+ {
++ if (g_ascii_strcasecmp(ext, fd->extension) != 0)
++ {
+ GList *new_list;
+ g_string_truncate(fname, base_len);
+ g_string_append(fname, ext);
+ new_list = check_case_insensitive_ext(fname->str);
+ group_list = g_list_concat(group_list, new_list);
++ }
+ }
+ else
+ {
diff --git a/geeqie.spec b/geeqie.spec
index 3171e4a..ddc5f35 100644
--- a/geeqie.spec
+++ b/geeqie.spec
@@ -3,7 +3,7 @@
Summary: Image browser and viewer
Name: geeqie
Version: 1.0
-Release: 8%{?dist}
+Release: 9%{?dist}
License: GPLv3
Group: User Interface/X
# svn + autogen
@@ -17,6 +17,8 @@ Patch0: geeqie-1.0-lfs-autoconf.patch
BuildRequires: autoconf
# reported upstream
Patch1: geeqie-1.0-exif-filecache.patch
+# bz 632243, reported upstream
+Patch2: geeqie-1.0-sidecars-case.patch
BuildRequires: gtk2-devel
BuildRequires: lcms-devel
@@ -56,6 +58,7 @@ for f in exiftran exiv2 mogrify ufraw-batch zenity ; do
done
%patch0 -p1 -b .lfs-autoconf
%patch1 -p1 -b .exif-filecache
+%patch2 -p1 -b .sidecars-case
%build
@@ -109,6 +112,16 @@ update-desktop-database &> /dev/null || :
%changelog
+* Sat Mar 5 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.0-9
+- Patch filedata.c check_case_insensitive_ext to accept the first
+ tested file name ext and not accept multiple combinations due to
+ case-insensitive fs.
+
+* Fri Mar 4 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.0-8.test1
+- Patch filedata.c check_sidecars to avoid adding a file as its own
+ sidecar. Case-insensitive sidecar file name generation may not be
+ enough if a fs stat is used in conjunction with a case-insensitive fs.
+
* Tue Feb 22 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.0-8
- Fix file cache NULL pointer crash in exif-common.c (#679256).
- Patch and build with large file support.
More information about the scm-commits
mailing list