gthumb crashes because of bug in exiv2 0.21.1 (#741429)

This commit is contained in:
Rex Dieter 2011-09-26 15:25:38 -05:00
parent f77490fec6
commit adbe03c5e2
2 changed files with 38 additions and 1 deletions

View File

@ -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());

View File

@ -2,7 +2,7 @@
Summary: Exif and Iptc metadata manipulation library Summary: Exif and Iptc metadata manipulation library
Name: exiv2 Name: exiv2
Version: 0.21.1 Version: 0.21.1
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/Multimedia Group: Applications/Multimedia
@ -10,6 +10,10 @@ URL: http://www.exiv2.org/
Source0: http://www.exiv2.org/exiv2-%{version}%{?pre:-%{pre}}.tar.gz Source0: http://www.exiv2.org/exiv2-%{version}%{?pre:-%{pre}}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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: chrpath
BuildRequires: expat-devel BuildRequires: expat-devel
BuildRequires: gettext BuildRequires: gettext
@ -53,6 +57,10 @@ methods for Exif thumbnails, classes to access Ifd and so on.
%prep %prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}} %setup -q -n %{name}-%{version}%{?pre:-%{pre}}
pushd src
%patch100 -p0 -b .tiffcomposite
popd
mkdir doc/html mkdir doc/html
@ -116,6 +124,9 @@ rm -rf %{buildroot}
%changelog %changelog
* Mon Sep 26 2011 Rex Dieter <rdieter@fedoraproject.org> 0.21.1-2
- gthumb crashes because of bug in exiv2 0.21.1 (#741429)
* Sat Feb 26 2011 Rex Dieter <rdieter@fedoraproject.org> 0.21.1-1 * Sat Feb 26 2011 Rex Dieter <rdieter@fedoraproject.org> 0.21.1-1
- exiv2-0.21.1 - exiv2-0.21.1