@@ -1,23 +1,27 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Licensed under the GNU General Public License, version 3.
|
# Licensed under the GNU General Public License, version 3.
|
||||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
# 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 pisitools
|
||||||
from pisi.actionsapi import get
|
from pisi.actionsapi import get
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
autotools.configure("--disable-static \
|
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
--disable-dependency-tracking \
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
--enable-video \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
--disable-rpath")
|
-DEXIV2_ENABLE_VIDEO=yes \
|
||||||
|
-DEXIV2_ENABLE_WEBREADY=yes \
|
||||||
|
-DEXIV2_ENABLE_CURL=yes \
|
||||||
|
-DEXIV2_ENABLE_NLS=ON \
|
||||||
|
-DEXIV2_BUILD_SAMPLES=no")
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
autotools.make()
|
cmaketools.make()
|
||||||
|
|
||||||
def install():
|
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")
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -13,13 +13,15 @@
|
|||||||
<IsA>app:console</IsA>
|
<IsA>app:console</IsA>
|
||||||
<Summary>Another library for parsing, editing, and saving EXIF data</Summary>
|
<Summary>Another library for parsing, editing, and saving EXIF data</Summary>
|
||||||
<Description>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.</Description>
|
<Description>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.</Description>
|
||||||
<Archive sha1sum="e68404958ebfbee39354f5aaaa895ac6abf127a2" type="targz">http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz</Archive>
|
<Archive sha1sum="1a72065c95e721b1c21df4f2ee64d8338c6acf94" type="targz">http://www.exiv2.org/builds/exiv2-0.27.2-Source.tar.gz</Archive>
|
||||||
<BuildDependencies>
|
<BuildDependencies>
|
||||||
|
<Dependency>cmake</Dependency>
|
||||||
|
<Dependency>curl-devel</Dependency>
|
||||||
<Dependency>zlib-devel</Dependency>
|
<Dependency>zlib-devel</Dependency>
|
||||||
<Dependency>expat-devel</Dependency>
|
<Dependency>expat-devel</Dependency>
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<Patches>
|
<Patches>
|
||||||
<Patch level="1">exiv2-0.18-deps.patch</Patch>
|
<Patch level="1">CVE-2019-17402.patch</Patch>
|
||||||
</Patches>
|
</Patches>
|
||||||
</Source>
|
</Source>
|
||||||
|
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
<Name>exiv2-libs</Name>
|
<Name>exiv2-libs</Name>
|
||||||
<RuntimeDependencies>
|
<RuntimeDependencies>
|
||||||
<Dependency>zlib</Dependency>
|
<Dependency>zlib</Dependency>
|
||||||
|
<Dependency>curl</Dependency>
|
||||||
<Dependency>expat</Dependency>
|
<Dependency>expat</Dependency>
|
||||||
<Dependency>libgcc</Dependency>
|
<Dependency>libgcc</Dependency>
|
||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
@@ -57,11 +60,19 @@
|
|||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
<Files>
|
<Files>
|
||||||
<Path fileType="header">/usr/include</Path>
|
<Path fileType="header">/usr/include</Path>
|
||||||
|
<Path fileType="data">/usr/lib/cmake</Path>
|
||||||
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||||
</Files>
|
</Files>
|
||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<History>
|
<History>
|
||||||
|
<Update release="6">
|
||||||
|
<Date>2020-01-05</Date>
|
||||||
|
<Version>0.27.2</Version>
|
||||||
|
<Comment>Version bump.</Comment>
|
||||||
|
<Name>Mustafa Cinasal</Name>
|
||||||
|
<Email>muscnsl@gmail.com</Email>
|
||||||
|
</Update>
|
||||||
<Update release="5">
|
<Update release="5">
|
||||||
<Date>2018-08-07</Date>
|
<Date>2018-08-07</Date>
|
||||||
<Version>0.26</Version>
|
<Version>0.26</Version>
|
||||||
|
|||||||
Reference in New Issue
Block a user