diff options
Diffstat (limited to 'source/l/exiv2')
-rwxr-xr-x | source/l/exiv2/exiv2.SlackBuild | 14 | ||||
-rwxr-xr-x | source/l/exiv2/paredown.sh | 30 | ||||
-rw-r--r-- | source/l/exiv2/patches/16c1cd7d.patch | 98 | ||||
-rw-r--r-- | source/l/exiv2/patches/3664f5b8.patch | 275 | ||||
-rw-r--r-- | source/l/exiv2/patches/b4f435a4.patch | 23 | ||||
-rw-r--r-- | source/l/exiv2/patches/f47e7bd6.patch | 25 |
6 files changed, 19 insertions, 446 deletions
diff --git a/source/l/exiv2/exiv2.SlackBuild b/source/l/exiv2/exiv2.SlackBuild index 49928b8b5..b3e0502d8 100755 --- a/source/l/exiv2/exiv2.SlackBuild +++ b/source/l/exiv2/exiv2.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=exiv2 -VERSION=${VERSION:-$(echo $PKGNAM-*-Source.tar.?z | rev | cut -f 3- -d . | cut -f 2 -d - | rev)} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: @@ -68,10 +68,10 @@ fi rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf $PKGNAM-$VERSION-Source +rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION-Source.tar.?z || exit 1 -cd $PKGNAM-$VERSION-Source || exit 1 +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ @@ -80,12 +80,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Upstream regression patches: -cat $CWD/patches/16c1cd7d.patch | patch -p1 --verbose || exit 1 -cat $CWD/patches/3664f5b8.patch | patch -p1 --verbose || exit 1 -cat $CWD/patches/b4f435a4.patch | patch -p1 --verbose || exit 1 -cat $CWD/patches/f47e7bd6.patch | patch -p1 --verbose || exit 1 - # Configure, build, and install: mkdir cmake-build cd cmake-build diff --git a/source/l/exiv2/paredown.sh b/source/l/exiv2/paredown.sh index a40aa335c..64b293821 100755 --- a/source/l/exiv2/paredown.sh +++ b/source/l/exiv2/paredown.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2013, 2019 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2013, 2019, 2023 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,24 +21,24 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PKGNAM=exiv2 -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.gz | rev | cut -f 3- -d . | cut -f 2 -d - | rev)} +VERSION=${VERSION:-$(echo v*.tar.gz | cut -f 2- -d v | rev | cut -f 3- -d . | rev)} -if [ ! -r $PKGNAM-${VERSION}-Source.tar.gz ]; then - echo "$PKGNAM-${VERSION}-Source.tar.gz does not exist. Exiting." +if [ ! -r v${VERSION}.tar.gz ]; then + echo "v${VERSION}.tar.gz does not exist. Exiting." exit 1 fi -touch -r $PKGNAM-${VERSION}-Source.tar.gz tmp-timestamp || exit 1 +OUTPUT_TIMESTAMP=$(tar tvvf v${VERSION}.tar.gz | head -n 1 | tr -d / | rev | cut -f 2,3 -d ' ' | rev) -rm -rf $PKGNAM-${VERSION}-Source -tar xf $PKGNAM-${VERSION}-Source.tar.gz || exit 1 -rm -rf $PKGNAM-${VERSION}-Source/test/data/* -rm -rf $PKGNAM-${VERSION}-Source/tests/bugfixes/* -rm -f $PKGNAM-${VERSION}-Source.tar.lz -tar cf $PKGNAM-${VERSION}-Source.tar $PKGNAM-${VERSION}-Source -touch -r tmp-timestamp $PKGNAM-${VERSION}-Source.tar -plzip -9 -v $PKGNAM-${VERSION}-Source.tar -rm -rf $PKGNAM-${VERSION}-Source tmp-timestamp +rm -rf $PKGNAM-${VERSION} +tar xf v${VERSION}.tar.gz || exit 1 +rm -rf $PKGNAM-${VERSION}/test/data/* +rm -rf $PKGNAM-${VERSION}/tests/bugfixes/* +rm -f $PKGNAM-${VERSION}.tar.lz +tar cf $PKGNAM-${VERSION}.tar $PKGNAM-${VERSION} +touch -d "$OUTPUT_TIMESTAMP" $PKGNAM-${VERSION}.tar +plzip -9 -v $PKGNAM-${VERSION}.tar +rm -rf $PKGNAM-${VERSION} v${VERSION}.tar.gz -echo "Repacking of $PKGNAM-${VERSION}-Source.tar.lz complete." +echo "Repacking of v${VERSION}.tar.gz complete." diff --git a/source/l/exiv2/patches/16c1cd7d.patch b/source/l/exiv2/patches/16c1cd7d.patch deleted file mode 100644 index fc8dc9b28..000000000 --- a/source/l/exiv2/patches/16c1cd7d.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 16c1cd7da0cd159ee2d53c39088564edaf046c77 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= - <miloskomarcevic@aim.com> -Date: Fri, 16 Jun 2023 17:05:39 +0200 -Subject: [PATCH] Fix regression parsing PNG text chunks with zero length - payload - ---- - src/pngchunk_int.cpp | 37 ++++++++++++++++++------------------- - 1 file changed, 18 insertions(+), 19 deletions(-) - -diff --git a/src/pngchunk_int.cpp b/src/pngchunk_int.cpp -index 697a30c63c..81fbcd942d 100644 ---- a/src/pngchunk_int.cpp -+++ b/src/pngchunk_int.cpp -@@ -100,20 +100,24 @@ DataBuf PngChunk::parseTXTChunk(const DataBuf& data, size_t keysize, TxtChunkTyp - } - - // compressed string after the compression technique spec -- const byte* compressedText = data.c_data(keysize + nullSeparators); - size_t compressedTextSize = data.size() - keysize - nullSeparators; -- enforce(compressedTextSize < data.size(), ErrorCode::kerCorruptedMetadata); -+ if (compressedTextSize) { -+ const byte* compressedText = data.c_data(keysize + nullSeparators); -+ enforce(compressedTextSize < data.size(), ErrorCode::kerCorruptedMetadata); - -- zlibUncompress(compressedText, static_cast<uint32_t>(compressedTextSize), arr); -+ zlibUncompress(compressedText, static_cast<uint32_t>(compressedTextSize), arr); -+ } - } else if (type == tEXt_Chunk) { - enforce(data.size() >= Safe::add(keysize, static_cast<size_t>(1)), ErrorCode::kerCorruptedMetadata); - // Extract a non-compressed Latin-1 text chunk - - // the text comes after the key, but isn't null terminated -- const byte* text = data.c_data(keysize + 1); - size_t textsize = data.size() - keysize - 1; -+ if (textsize) { -+ const byte* text = data.c_data(keysize + 1); - -- arr = DataBuf(text, textsize); -+ arr = DataBuf(text, textsize); -+ } - } else if (type == iTXt_Chunk) { - enforce(data.size() > Safe::add(keysize, static_cast<size_t>(3)), ErrorCode::kerCorruptedMetadata); - const size_t nullCount = std::count(data.c_data(keysize + 3), data.c_data(data.size() - 1), '\0'); -@@ -127,7 +131,8 @@ DataBuf PngChunk::parseTXTChunk(const DataBuf& data, size_t keysize, TxtChunkTyp - const byte compressionMethod = data.read_uint8(keysize + 2); - - enforce(compressionFlag == 0x00 || compressionFlag == 0x01, ErrorCode::kerCorruptedMetadata); -- enforce(compressionMethod == 0x00, ErrorCode::kerCorruptedMetadata); -+ if (compressionFlag == 0x01) -+ enforce(compressionMethod == 0x00, ErrorCode::kerFailedToReadImageData); - - // language description string after the compression technique spec - const size_t languageTextMaxSize = data.size() - keysize - 3; -@@ -141,14 +146,14 @@ DataBuf PngChunk::parseTXTChunk(const DataBuf& data, size_t keysize, TxtChunkTyp - data.size() - (keysize + 3 + languageTextSize + 1)); - const size_t translatedKeyTextSize = translatedKeyText.size(); - -- if ((compressionFlag == 0x00) || (compressionFlag == 0x01 && compressionMethod == 0x00)) { -- enforce(Safe::add(keysize + 3 + languageTextSize + 1, Safe::add(translatedKeyTextSize, static_cast<size_t>(1))) <= -- data.size(), -- ErrorCode::kerCorruptedMetadata); -+ enforce(Safe::add(keysize + 3 + languageTextSize + 1, Safe::add(translatedKeyTextSize, static_cast<size_t>(1))) <= -+ data.size(), -+ ErrorCode::kerCorruptedMetadata); - -+ const auto textsize = -+ static_cast<long>(data.size() - (keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1)); -+ if (textsize) { - const byte* text = data.c_data(keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1); -- const auto textsize = -- static_cast<long>(data.size() - (keysize + 3 + languageTextSize + 1 + translatedKeyTextSize + 1)); - - if (compressionFlag == 0x00) { - // then it's an uncompressed iTXt chunk -@@ -156,7 +161,7 @@ DataBuf PngChunk::parseTXTChunk(const DataBuf& data, size_t keysize, TxtChunkTyp - std::cout << "Exiv2::PngChunk::parseTXTChunk: We found an uncompressed iTXt field\n"; - #endif - arr = DataBuf(text, textsize); -- } else if (compressionFlag == 0x01 && compressionMethod == 0x00) { -+ } else { - // then it's a zlib compressed iTXt chunk - #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "Exiv2::PngChunk::parseTXTChunk: We found a zlib compressed iTXt field\n"; -@@ -165,12 +170,6 @@ DataBuf PngChunk::parseTXTChunk(const DataBuf& data, size_t keysize, TxtChunkTyp - // the compressed text comes after the translated keyword, but isn't null terminated - zlibUncompress(text, textsize, arr); - } -- } else { -- // then it isn't zlib compressed and we are sunk --#ifdef EXIV2_DEBUG_MESSAGES -- std::cerr << "Exiv2::PngChunk::parseTXTChunk: Non-standard iTXt compression method.\n"; --#endif -- throw Error(ErrorCode::kerFailedToReadImageData); - } - } else { - #ifdef DEBUG diff --git a/source/l/exiv2/patches/3664f5b8.patch b/source/l/exiv2/patches/3664f5b8.patch deleted file mode 100644 index 4a14765b7..000000000 --- a/source/l/exiv2/patches/3664f5b8.patch +++ /dev/null @@ -1,275 +0,0 @@ -From 360c6cd41f15baf6d999da12e1fc077180f5da91 Mon Sep 17 00:00:00 2001 -From: Kevin Backhouse <kevinbackhouse@github.com> -Date: Sun, 25 Jun 2023 16:14:06 +0100 -Subject: [PATCH 1/2] Check if the metadata is NULL. - ---- - src/nikonmn_int.cpp | 16 ++++++++-------- - src/sonymn_int.cpp | 4 ++-- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/src/nikonmn_int.cpp b/src/nikonmn_int.cpp -index 2887c1b621..949023d00e 100644 ---- a/src/nikonmn_int.cpp -+++ b/src/nikonmn_int.cpp -@@ -3384,7 +3384,7 @@ std::ostream& Nikon3MakerNote::printExternalFlashData2(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashMasterDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3413,7 +3413,7 @@ std::ostream& Nikon3MakerNote::printFlashMasterDataFl6(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashMasterDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3480,7 +3480,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupBCControlData(std::ostream& os, co - - std::ostream& Nikon3MakerNote::printFlashGroupADataFl6(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3509,7 +3509,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupADataFl6(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashGroupADataFl7(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3538,7 +3538,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupADataFl7(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashGroupBDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3567,7 +3567,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupBDataFl6(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashGroupBDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3596,7 +3596,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupBDataFl7(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashGroupCDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -@@ -3625,7 +3625,7 @@ std::ostream& Nikon3MakerNote::printFlashGroupCDataFl6(std::ostream& os, const V - - std::ostream& Nikon3MakerNote::printFlashGroupCDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) { - std::ios::fmtflags f(os.flags()); -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - os.flags(f); - return os; -diff --git a/src/sonymn_int.cpp b/src/sonymn_int.cpp -index f2950c4608..2fe62bdbf2 100644 ---- a/src/sonymn_int.cpp -+++ b/src/sonymn_int.cpp -@@ -1799,7 +1799,7 @@ const TagInfo* SonyMakerNote::tagListFp() { - - std::ostream& SonyMakerNote::printSony2FpAmbientTemperature(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1) -+ if (value.count() != 1 || !metadata) - return os << "(" << value << ")"; - - auto pos = metadata->findKey(ExifKey("Exif.Sony2Fp.0x0002")); -@@ -1879,7 +1879,7 @@ const TagInfo* SonyMakerNote::tagListSonyMisc1() { - - std::ostream& SonyMakerNote::printSonyMisc1CameraTemperature(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1) -+ if (value.count() != 1 || !metadata) - return os << "(" << value << ")"; - - auto pos = metadata->findKey(ExifKey("Exif.SonyMisc1.0x0004")); - -From 1119a68a1e90b5a278f4ecc70461bfca786eee0d Mon Sep 17 00:00:00 2001 -From: Kevin Backhouse <kevinbackhouse@github.com> -Date: Sun, 25 Jun 2023 22:23:24 +0100 -Subject: [PATCH 2/2] Check if the metadata is NULL. - ---- - src/sonymn_int.cpp | 34 +++++++++++++++++----------------- - 1 file changed, 17 insertions(+), 17 deletions(-) - -diff --git a/src/sonymn_int.cpp b/src/sonymn_int.cpp -index 2fe62bdbf2..a2cde2282c 100644 ---- a/src/sonymn_int.cpp -+++ b/src/sonymn_int.cpp -@@ -827,7 +827,7 @@ std::ostream& SonyMakerNote::printWBShiftABGM(std::ostream& os, const Value& val - } - - std::ostream& SonyMakerNote::printFocusMode2(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -854,7 +854,7 @@ std::ostream& SonyMakerNote::printFocusMode2(std::ostream& os, const Value& valu - } - - std::ostream& SonyMakerNote::printAFAreaModeSetting(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -891,7 +891,7 @@ std::ostream& SonyMakerNote::printAFAreaModeSetting(std::ostream& os, const Valu - } - - std::ostream& SonyMakerNote::printFlexibleSpotPosition(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 2 || value.typeId() != unsignedShort) { -+ if (value.count() != 2 || value.typeId() != unsignedShort || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -916,7 +916,7 @@ std::ostream& SonyMakerNote::printFlexibleSpotPosition(std::ostream& os, const V - } - - std::ostream& SonyMakerNote::printAFPointSelected(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -967,7 +967,7 @@ std::ostream& SonyMakerNote::printAFPointSelected(std::ostream& os, const Value& - } - - std::ostream& SonyMakerNote::printAFPointsUsed(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.typeId() != unsignedByte) { -+ if (value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -994,7 +994,7 @@ std::ostream& SonyMakerNote::printAFPointsUsed(std::ostream& os, const Value& va - } - - std::ostream& SonyMakerNote::printAFTracking(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) { -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -1297,7 +1297,7 @@ std::ostream& SonyMakerNote::printImageSize(std::ostream& os, const Value& value - } - - std::ostream& SonyMakerNote::printFocusMode(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedShort) { -+ if (value.count() != 1 || value.typeId() != unsignedShort || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -1314,7 +1314,7 @@ std::ostream& SonyMakerNote::printFocusMode(std::ostream& os, const Value& value - } - - std::ostream& SonyMakerNote::printAFMode(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedShort) { -+ if (value.count() != 1 || value.typeId() != unsignedShort || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -1336,7 +1336,7 @@ std::ostream& SonyMakerNote::printAFMode(std::ostream& os, const Value& value, c - } - - std::ostream& SonyMakerNote::printFocusMode3(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedShort) { -+ if (value.count() != 1 || value.typeId() != unsignedShort || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -1353,7 +1353,7 @@ std::ostream& SonyMakerNote::printFocusMode3(std::ostream& os, const Value& valu - - std::ostream& SonyMakerNote::printHighISONoiseReduction2(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedShort) { -+ if (value.count() != 1 || value.typeId() != unsignedShort || !metadata) { - os << "(" << value << ")"; - return os; - } -@@ -1840,7 +1840,7 @@ std::ostream& SonyMakerNote::printSony2FpFocusMode(std::ostream& os, const Value - - std::ostream& SonyMakerNote::printSony2FpFocusPosition2(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1) -+ if (value.count() != 1 || !metadata) - os << "(" << value << ")"; - else { - std::string model; -@@ -1944,7 +1944,7 @@ const TagInfo* SonyMakerNote::tagListSonyMisc2b() { - - std::ostream& SonyMakerNote::printSonyMisc2bLensZoomPosition(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1) -+ if (value.count() != 1 || !metadata) - return os << "(" << value << ")"; - - std::string model; -@@ -1966,7 +1966,7 @@ std::ostream& SonyMakerNote::printSonyMisc2bLensZoomPosition(std::ostream& os, c - - std::ostream& SonyMakerNote::printSonyMisc2bFocusPosition2(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1) -+ if (value.count() != 1 || !metadata) - return os << "(" << value << ")"; - - std::string model; -@@ -2052,7 +2052,7 @@ const TagInfo* SonyMakerNote::tagListSonyMisc3c() { - - std::ostream& SonyMakerNote::printSonyMisc3cShotNumberSincePowerUp(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedLong) -+ if (value.count() != 1 || value.typeId() != unsignedLong || !metadata) - return os << "(" << value << ")"; - - std::string model; -@@ -2083,7 +2083,7 @@ std::ostream& SonyMakerNote::printSonyMisc3cSequenceNumber(std::ostream& os, con - } - - std::ostream& SonyMakerNote::printSonyMisc3cQuality2(std::ostream& os, const Value& value, const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) - return os << "(" << value << ")"; - - std::string model; -@@ -2108,7 +2108,7 @@ std::ostream& SonyMakerNote::printSonyMisc3cQuality2(std::ostream& os, const Val - - std::ostream& SonyMakerNote::printSonyMisc3cSonyImageHeight(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedShort) -+ if (value.count() != 1 || value.typeId() != unsignedShort || !metadata) - return os << "(" << value << ")"; - - std::string model; -@@ -2131,7 +2131,7 @@ std::ostream& SonyMakerNote::printSonyMisc3cSonyImageHeight(std::ostream& os, co - - std::ostream& SonyMakerNote::printSonyMisc3cModelReleaseYear(std::ostream& os, const Value& value, - const ExifData* metadata) { -- if (value.count() != 1 || value.typeId() != unsignedByte) -+ if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) - return os << "(" << value << ")"; - - std::string model; diff --git a/source/l/exiv2/patches/b4f435a4.patch b/source/l/exiv2/patches/b4f435a4.patch deleted file mode 100644 index 8332a1e84..000000000 --- a/source/l/exiv2/patches/b4f435a4.patch +++ /dev/null @@ -1,23 +0,0 @@ -From b4f435a4ecceba0ef3a785dbe8eead6f55f49cc1 Mon Sep 17 00:00:00 2001 -From: Kevin Backhouse <kevinbackhouse@github.com> -Date: Sat, 17 Jun 2023 13:39:15 +0100 -Subject: [PATCH] Avoid triggering assertion in std::vector::operator[] - -(cherry picked from commit 3202e86e737ea181a1904c9d3b9a6b619c3baba5) ---- - src/types.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/types.cpp b/src/types.cpp -index 6559e20f4d..1c6963cda4 100644 ---- a/src/types.cpp -+++ b/src/types.cpp -@@ -173,7 +173,7 @@ byte* Exiv2::DataBuf::data(size_t offset) { - } - - const byte* Exiv2::DataBuf::c_data(size_t offset) const { -- if (pData_.empty()) { -+ if (pData_.empty() || offset == pData_.size()) { - return nullptr; - } - if (offset > pData_.size()) { diff --git a/source/l/exiv2/patches/f47e7bd6.patch b/source/l/exiv2/patches/f47e7bd6.patch deleted file mode 100644 index 1b74678a5..000000000 --- a/source/l/exiv2/patches/f47e7bd6.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f47e7bd666aa063d016bdf00ea8f62c97a5b5a7a Mon Sep 17 00:00:00 2001 -From: Kevin Backhouse <kevinbackhouse@github.com> -Date: Sat, 17 Jun 2023 13:10:07 +0100 -Subject: [PATCH] Fix unit test failure. - -(cherry picked from commit 33071f33b2996a3ccbdd51f8cc3b958b5eed0e0b) ---- - unitTests/test_types.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/unitTests/test_types.cpp b/unitTests/test_types.cpp -index 5cfd80d5e9..b13bbc6825 100644 ---- a/unitTests/test_types.cpp -+++ b/unitTests/test_types.cpp -@@ -49,8 +49,8 @@ TEST(DataBuf, canBeConstructedFromExistingData) { - TEST(DataBuf, tryingToAccessTooFarElementThrows) { - const std::array<byte, 4> data{'h', 'o', 'l', 'a'}; - DataBuf instance(data.data(), data.size()); -- ASSERT_THROW([[maybe_unused]] auto d = instance.data(4), std::out_of_range); -- ASSERT_THROW([[maybe_unused]] auto d = instance.c_data(4), std::out_of_range); -+ ASSERT_THROW([[maybe_unused]] auto d = instance.data(5), std::out_of_range); -+ ASSERT_THROW([[maybe_unused]] auto d = instance.c_data(5), std::out_of_range); - } - - TEST(DataBuf, readUintFunctionsWorksOnExistingData) { |