From 125958af54ba80b2e22888c46ee38c6c1930a22f377b8a833dcdd884584282d0 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Thu, 3 Jan 2019 17:50:27 +0000 Subject: [PATCH] Accepting request 662652 from home:wolfi323:branches:KDE:Extra - Add Fix-the-exiv2-fix.patch to fix a bug in the previous patch that could cause crashes when opening certain JPG files (that contain XMP tags) Should be fine now... OBS-URL: https://build.opensuse.org/request/show/662652 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krita?expand=0&rev=90 --- Fix-the-exiv2-fix.patch | 25 +++++++++++++++++++++++++ krita.changes | 7 +++++++ krita.spec | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 Fix-the-exiv2-fix.patch diff --git a/Fix-the-exiv2-fix.patch b/Fix-the-exiv2-fix.patch new file mode 100644 index 0000000..95657e1 --- /dev/null +++ b/Fix-the-exiv2-fix.patch @@ -0,0 +1,25 @@ +From 2b4671f64e35bee3a6ea4ad962570781336ff267 Mon Sep 17 00:00:00 2001 +From: Boudewijn Rempt +Date: Thu, 3 Jan 2019 11:43:56 +0100 +Subject: Fix the exiv2 fix... + +--- + libs/ui/kisexiv2/kis_xmp_io.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libs/ui/kisexiv2/kis_xmp_io.cpp b/libs/ui/kisexiv2/kis_xmp_io.cpp +index db76f25..d334b05 100644 +--- a/libs/ui/kisexiv2/kis_xmp_io.cpp ++++ b/libs/ui/kisexiv2/kis_xmp_io.cpp +@@ -276,7 +276,7 @@ bool KisXMPIO::loadFrom(KisMetaData::Store* store, QIODevice* ioDevice) const + const Exiv2::XmpArrayValue* xav = dynamic_cast(value.get()); + Q_ASSERT(xav); + QList array; +- for (int i = 0; i < xav->size(); ++i) { ++ for (int i = 0; i < xav->count(); ++i) { + QString value = QString::fromStdString(xav->toString(i)); + if (parser) { + array.push_back(parser->parse(value)); +-- +cgit v1.1 + diff --git a/krita.changes b/krita.changes index 2aa31f2..0bc9760 100644 --- a/krita.changes +++ b/krita.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 3 11:01:20 UTC 2019 - wbauer@tmo.at + +- Add Fix-the-exiv2-fix.patch to fix a bug in the previous patch + that could cause crashes when opening certain JPG files (that + contain XMP tags) + ------------------------------------------------------------------- Sun Dec 30 11:56:22 UTC 2018 - wbauer@tmo.at diff --git a/krita.spec b/krita.spec index f1c4369..5ab2f5e 100644 --- a/krita.spec +++ b/krita.spec @@ -37,6 +37,8 @@ Source0: http://download.kde.org/stable/krita/%{version}/krita-%{version} Patch: fix_libgif_5_0_build.patch # PATCH-FIX-UPSTREAM Patch1: Fix-building-against-exiv2-0.27.patch +# PATCH-FIX-UPSTREAM +Patch2: Fix-the-exiv2-fix.patch BuildRequires: Mesa-devel BuildRequires: OpenColorIO-devel BuildRequires: OpenEXR-devel @@ -137,6 +139,7 @@ Development headers and libraries for Krita. %patch %endif %patch1 -p1 +%patch2 -p1 %build # install translations to %%{_kf5_localedir} so they don't clash with the krita translations in calligra-l10n (KDE4 based)