diff --git a/multimedia/misc/exiv2/actions.py b/multimedia/misc/exiv2/actions.py
index 829362796b..061f932f4a 100644
--- a/multimedia/misc/exiv2/actions.py
+++ b/multimedia/misc/exiv2/actions.py
@@ -1,23 +1,27 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
-from pisi.actionsapi import autotools
+from pisi.actionsapi import cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
- autotools.configure("--disable-static \
- --disable-dependency-tracking \
- --enable-video \
- --disable-rpath")
+ cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DEXIV2_ENABLE_VIDEO=yes \
+ -DEXIV2_ENABLE_WEBREADY=yes \
+ -DEXIV2_ENABLE_CURL=yes \
+ -DEXIV2_ENABLE_NLS=ON \
+ -DEXIV2_BUILD_SAMPLES=no")
def build():
- autotools.make()
+ cmaketools.make()
def install():
- autotools.rawInstall("DESTDIR=%s" % get.installDIR())
+ cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
- pisitools.dodoc("COPYING", "README", "doc/ChangeLog")
+ pisitools.dodoc("COPYING*", "README*", "doc/ChangeLog")
diff --git a/multimedia/misc/exiv2/files/CVE-2019-17402.patch b/multimedia/misc/exiv2/files/CVE-2019-17402.patch
new file mode 100644
index 0000000000..45451442d5
--- /dev/null
+++ b/multimedia/misc/exiv2/files/CVE-2019-17402.patch
@@ -0,0 +1,49 @@
+diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp
+index 29311fd..c0d9553 100644
+--- a/src/crwimage_int.cpp
++++ b/src/crwimage_int.cpp
+@@ -268,6 +268,9 @@ namespace Exiv2 {
+ #ifdef EXIV2_DEBUG_MESSAGES
+ std::cout << "Reading directory 0x" << std::hex << tag() << "\n";
+ #endif
++ if (this->offset() + this->size() > size)
++ throw Error(kerOffsetOutOfRange);
++
+ readDirectory(pData + offset(), this->size(), byteOrder);
+ #ifdef EXIV2_DEBUG_MESSAGES
+ std::cout << "<---- 0x" << std::hex << tag() << "\n";
+diff --git a/test/data/POC-file_issue_1019 b/test/data/POC-file_issue_1019
+new file mode 100755
+index 0000000..e69de29
+diff --git a/tests/bugfixes/github/test_issue_1019.py b/tests/bugfixes/github/test_issue_1019.py
+new file mode 100644
+index 0000000..c2682f9
+--- /dev/null
++++ b/tests/bugfixes/github/test_issue_1019.py
+@@ -0,0 +1,14 @@
++from system_tests import CaseMeta, path
++
++
++class OverreadInCiffDirectoryReadDirectory(metaclass=CaseMeta):
++
++ filename = path("$data_path/POC-file_issue_1019")
++ commands = ["$exiv2 -pv $filename"]
++ stdout = [""]
++ stderr = [
++ """$exiv2_exception_message $filename:
++$kerOffsetOutOfRange
++"""
++ ]
++ retval = [1]
+diff --git a/tests/suite.conf b/tests/suite.conf
+index 5b31930..dab7427 100644
+--- a/tests/suite.conf
++++ b/tests/suite.conf
+@@ -19,6 +19,7 @@ largeiptc_test: ${ENV:exiv2_path}/largeiptc-test${ENV:binary_extension}
+ easyaccess_test: ${ENV:exiv2_path}/easyaccess-test${ENV:binary_extension}
+
+ [variables]
++kerOffsetOutOfRange: Offset out of range
+ kerFailedToReadImageData: Failed to read image data
+ kerCorruptedMetadata: corrupted image metadata
+ kerInvalidMalloc: invalid memory allocation request
diff --git a/multimedia/misc/exiv2/pspec.xml b/multimedia/misc/exiv2/pspec.xml
index 84c9943013..d1f7bb4bf8 100644
--- a/multimedia/misc/exiv2/pspec.xml
+++ b/multimedia/misc/exiv2/pspec.xml
@@ -13,13 +13,15 @@
app:console
Another library for parsing, editing, and saving EXIF data
exiv2 is a C++ library and a command line utility to access image metadata. Exiv2 is available as free software and with a commercial license, and is used in a growing number of projects.
- http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
+ http://www.exiv2.org/builds/exiv2-0.27.2-Source.tar.gz
+ cmake
+ curl-devel
zlib-devel
expat-devel
- exiv2-0.18-deps.patch
+ CVE-2019-17402.patch
@@ -41,6 +43,7 @@
exiv2-libs
zlib
+ curl
expat
libgcc
@@ -57,11 +60,19 @@
/usr/include
+ /usr/lib/cmake
/usr/lib/pkgconfig
+
+ 2020-01-05
+ 0.27.2
+ Version bump.
+ Mustafa Cinasal
+ muscnsl@gmail.com
+
2018-08-07
0.26