diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2023-10-27 19:47:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-10-27 22:34:33 +0200 |
commit | f4d1448dd43416a6f46af26fa4422de1c626cfc7 (patch) | |
tree | 0edc43da9a23002aba6d0c71aea8144c4922a271 /source/l/exiv2 | |
parent | 05ec45c9c979a958e022fe691e6cf03a338e9263 (diff) | |
download | current-f4d1448dd43416a6f46af26fa4422de1c626cfc7.tar.gz current-f4d1448dd43416a6f46af26fa4422de1c626cfc7.tar.xz |
Fri Oct 27 19:47:36 UTC 202320231027194736
a/exfatprogs-1.2.2-x86_64-1.txz: Upgraded.
kde/digikam-8.1.0-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
kde/gwenview-23.08.2-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
kde/kfilemetadata-5.111.0-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
kde/krename-5.0.2-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
kde/krita-5.2.0-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
kde/libkexiv2-23.08.2-x86_64-2.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
l/QtAV-20220226_fdc613dc-x86_64-1.txz: Removed.
This is no longer used by digikam, so let's just remove it.
l/exiv2-0.28.0-x86_64-1.txz: Upgraded.
Shared library .so-version bump.
l/libsoup3-3.4.4-x86_64-1.txz: Upgraded.
n/c-ares-1.21.0-x86_64-1.txz: Upgraded.
n/gpgme-1.23.1-x86_64-1.txz: Upgraded.
n/nghttp2-1.58.0-x86_64-1.txz: Upgraded.
xap/geeqie-2.1-x86_64-3.txz: Rebuilt.
Recompiled against exiv2-0.28.0.
Diffstat (limited to 'source/l/exiv2')
-rwxr-xr-x | source/l/exiv2/exiv2.SlackBuild | 8 | ||||
-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 |
5 files changed, 428 insertions, 1 deletions
diff --git a/source/l/exiv2/exiv2.SlackBuild b/source/l/exiv2/exiv2.SlackBuild index 6d49c6900..49928b8b5 100755 --- a/source/l/exiv2/exiv2.SlackBuild +++ b/source/l/exiv2/exiv2.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2007 Frank Caraballo <fecaraballo{at}gmail{dot}com> -# Copyright 2008, 2009, 2011, 2015, 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2011, 2015, 2017, 2018, 2019, 2020, 2023 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -80,6 +80,12 @@ 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/patches/16c1cd7d.patch b/source/l/exiv2/patches/16c1cd7d.patch new file mode 100644 index 000000000..fc8dc9b28 --- /dev/null +++ b/source/l/exiv2/patches/16c1cd7d.patch @@ -0,0 +1,98 @@ +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 new file mode 100644 index 000000000..4a14765b7 --- /dev/null +++ b/source/l/exiv2/patches/3664f5b8.patch @@ -0,0 +1,275 @@ +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 new file mode 100644 index 000000000..8332a1e84 --- /dev/null +++ b/source/l/exiv2/patches/b4f435a4.patch @@ -0,0 +1,23 @@ +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 new file mode 100644 index 000000000..1b74678a5 --- /dev/null +++ b/source/l/exiv2/patches/f47e7bd6.patch @@ -0,0 +1,25 @@ +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) { |