[exiv2] gthumb crashes because of bug in exiv2 0.21.1 (#741429)
Rex Dieter
rdieter at fedoraproject.org
Mon Sep 26 20:25:50 UTC 2011
commit adbe03c5e2e3f5d3d9c38de15bf57daea09242c9
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Mon Sep 26 15:25:38 2011 -0500
gthumb crashes because of bug in exiv2 0.21.1 (#741429)
exiv2-0.21.1-tiffcomposite.patch | 26 ++++++++++++++++++++++++++
exiv2.spec | 13 ++++++++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/exiv2-0.21.1-tiffcomposite.patch b/exiv2-0.21.1-tiffcomposite.patch
new file mode 100644
index 0000000..0f4e469
--- /dev/null
+++ b/exiv2-0.21.1-tiffcomposite.patch
@@ -0,0 +1,26 @@
+Index: tiffcomposite.cpp
+===================================================================
+--- tiffcomposite.cpp (revision 2561)
++++ tiffcomposite.cpp (revision 2562)
+@@ -1689,11 +1689,19 @@
+
+ if (elements_.empty()) return 0;
+
++ // Remaining assumptions:
++ // - array elements don't "overlap"
++ // - no duplicate tags in the array
+ uint32_t idx = 0;
++ uint32_t sz = cfg()->tagStep();
+ for (Components::const_iterator i = elements_.begin(); i != elements_.end(); ++i) {
+- idx = EXV_MAX(idx, (*i)->tag() * cfg()->tagStep());
+- idx += (*i)->size();
++ if ((*i)->tag() > idx) {
++ idx = (*i)->tag();
++ sz = (*i)->size();
++ }
+ }
++ idx = idx * cfg()->tagStep() + sz;
++
+ if (cfg()->hasFillers_ && def()) {
+ const ArrayDef* lastDef = def() + defSize() - 1;
+ uint16_t lastTag = static_cast<uint16_t>(lastDef->idx_ / cfg()->tagStep());
diff --git a/exiv2.spec b/exiv2.spec
index ead19b3..b7bf072 100644
--- a/exiv2.spec
+++ b/exiv2.spec
@@ -2,7 +2,7 @@
Summary: Exif and Iptc metadata manipulation library
Name: exiv2
Version: 0.21.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: Applications/Multimedia
@@ -10,6 +10,10 @@ URL: http://www.exiv2.org/
Source0: http://www.exiv2.org/exiv2-%{version}%{?pre:-%{pre}}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+## upstream patches
+# http://dev.exiv2.org/issues/769
+Patch100: exiv2-0.21.1-tiffcomposite.patch
+
BuildRequires: chrpath
BuildRequires: expat-devel
BuildRequires: gettext
@@ -53,6 +57,10 @@ methods for Exif thumbnails, classes to access Ifd and so on.
%prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
+pushd src
+%patch100 -p0 -b .tiffcomposite
+popd
+
mkdir doc/html
@@ -116,6 +124,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 26 2011 Rex Dieter <rdieter at fedoraproject.org> 0.21.1-2
+- gthumb crashes because of bug in exiv2 0.21.1 (#741429)
+
* Sat Feb 26 2011 Rex Dieter <rdieter at fedoraproject.org> 0.21.1-1
- exiv2-0.21.1
More information about the scm-commits
mailing list