[kdegraphics/f12/master] added patches to fix crashing digikam 1.2.0
thomasj
thomasj at fedoraproject.org
Thu Sep 16 14:21:56 UTC 2010
commit eb1259c8b63af3cc6f0e8e555c10ed1e6fbb7950
Author: Thomas Janssen <thomasj at fedoraproject.org>
Date: Thu Sep 16 15:36:29 2010 +0200
added patches to fix crashing digikam 1.2.0
kdegraphics.spec | 12 +++-
...246675_crash_digikam-1_2_0-kexiv2exif.cpp.patch | 11 +++
...46675_crash_digikam-1_2_0-kexiv2image.cpp.patch | 68 ++++++++++++++++++++
3 files changed, 89 insertions(+), 2 deletions(-)
---
diff --git a/kdegraphics.spec b/kdegraphics.spec
index c258140..33d7af8 100644
--- a/kdegraphics.spec
+++ b/kdegraphics.spec
@@ -8,7 +8,7 @@
Summary: KDE Graphics Applications
Epoch: 7
Version: 4.4.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Name: kdegraphics
#Obsoletes: kdegraphics4 < %{version}-%{release}
@@ -24,6 +24,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# CVE-2010-2575, Okular PDB Processing Memory Corruption Vulnerability
Patch100: kdegraphics-okular-cve-2010-2575.patch
+#backported patches
+Patch10: kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2exif.cpp.patch
+Patch20: kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2image.cpp.patch
+
%if 0%{?fedora}
BuildRequires: chmlib-devel
BuildRequires: ebook-tools-devel
@@ -104,7 +108,8 @@ Summary: A kioslave for displaying WinHelp files
%setup -q -n kdegraphics-%{version}%{?alphatag}
%patch100 -p1 -b .cve-2010-2575
-
+%patch10 -p0
+%patch20 -p0
%build
mkdir -p %{_target_platform}
@@ -240,6 +245,9 @@ fi
%changelog
+* Thu Sep 16 2010 Thomas Janssen <thomasj at fedoraproject.org> - 7:4.4.5-4
+- added patches to fix crashing digikam 1.2.0
+
* Thu Aug 26 2010 Than Ngo <than at redhat.com> - 7:4.4.5-3
- Security fix, Okular PDB Processing Memory Corruption Vulnerability
cve-2010-2575
diff --git a/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2exif.cpp.patch b/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2exif.cpp.patch
new file mode 100644
index 0000000..0d362bb
--- /dev/null
+++ b/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2exif.cpp.patch
@@ -0,0 +1,11 @@
+--- libs/libkexiv2/libkexiv2/kexiv2exif.cpp 2010/08/10 19:02:01 1161753
++++ libs/libkexiv2/libkexiv2/kexiv2exif.cpp 2010/08/10 19:03:53 1161754
+@@ -775,7 +775,7 @@
+ Exiv2::ExifData::iterator it = exifData.findKey(key1);
+ if (it == exifData.end())
+ it = exifData.findKey(key2);
+- if (it != exifData.end())
++ if (it != exifData.end() && it->count())
+ {
+ long orientation = it->toLong();
+ kDebug(51003) << "Exif Thumbnail Orientation: " << (int)orientation << endl;
diff --git a/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2image.cpp.patch b/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2image.cpp.patch
new file mode 100644
index 0000000..0808b11
--- /dev/null
+++ b/kdegraphics_fix_246675_crash_digikam-1_2_0-kexiv2image.cpp.patch
@@ -0,0 +1,68 @@
+--- libs/libkexiv2/libkexiv2/kexiv2image.cpp 2010/08/10 19:02:01 1161753
++++ libs/libkexiv2/libkexiv2/kexiv2image.cpp 2010/08/10 19:03:53 1161754
+@@ -99,12 +99,12 @@
+ Exiv2::ExifData exifData(d->exifMetadata());
+ Exiv2::ExifKey key("Exif.Photo.PixelXDimension");
+ Exiv2::ExifData::iterator it = exifData.findKey(key);
+- if (it != exifData.end())
++ if (it != exifData.end() && it->count())
+ width = it->toLong();
+
+ Exiv2::ExifKey key2("Exif.Photo.PixelYDimension");
+ Exiv2::ExifData::iterator it2 = exifData.findKey(key2);
+- if (it2 != exifData.end())
++ if (it2 != exifData.end() && it2->count())
+ height = it2->toLong();
+
+ if (width != -1 && height != -1)
+@@ -117,12 +117,12 @@
+
+ Exiv2::ExifKey key3("Exif.Image.ImageWidth");
+ Exiv2::ExifData::iterator it3 = exifData.findKey(key3);
+- if (it3 != exifData.end())
++ if (it3 != exifData.end() && it3->count())
+ width = it3->toLong();
+
+ Exiv2::ExifKey key4("Exif.Image.ImageLength");
+ Exiv2::ExifData::iterator it4 = exifData.findKey(key4);
+- if (it4 != exifData.end())
++ if (it4 != exifData.end() && it4->count())
+ height = it4->toLong();
+
+ if (width != -1 && height != -1)
+@@ -230,7 +230,7 @@
+ Exiv2::ExifKey minoltaKey1("Exif.MinoltaCs7D.Rotation");
+ it = exifData.findKey(minoltaKey1);
+
+- if (it != exifData.end())
++ if (it != exifData.end() && it->count())
+ {
+ orientation = it->toLong();
+ kDebug(51003) << "Orientation => Exif.MinoltaCs7D.Rotation => " << (int)orientation << endl;
+@@ -249,7 +249,7 @@
+ Exiv2::ExifKey minoltaKey2("Exif.MinoltaCs5D.Rotation");
+ it = exifData.findKey(minoltaKey2);
+
+- if (it != exifData.end())
++ if (it != exifData.end() && it->count())
+ {
+ orientation = it->toLong();
+ kDebug(51003) << "Orientation => Exif.MinoltaCs5D.Rotation => " << (int)orientation << endl;
+@@ -270,7 +270,7 @@
+ Exiv2::ExifKey keyStd("Exif.Image.Orientation");
+ it = exifData.findKey(keyStd);
+
+- if (it != exifData.end())
++ if (it != exifData.end() && it->count())
+ {
+ orientation = it->toLong();
+ kDebug(51003) << "Orientation => Exif.Image.Orientation => " << (int)orientation << endl;
+@@ -357,7 +357,7 @@
+
+ Exiv2::ExifKey thumbKey("Exif.Thumbnail.Orientation");
+ it = d->exifMetadata().findKey(thumbKey);
+- if (it != d->exifMetadata().end())
++ if (it != d->exifMetadata().end() && it->count())
+ {
+ RotationMatrix operation((KExiv2Iface::KExiv2::ImageOrientation)it->toLong());
+ operation *= orientation;
More information about the scm-commits
mailing list