diff --git a/.github/workflows/on_PR_linux_matrix.yml b/.github/workflows/on_PR_linux_matrix.yml index 4292316252..fee6434db1 100644 --- a/.github/workflows/on_PR_linux_matrix.yml +++ b/.github/workflows/on_PR_linux_matrix.yml @@ -19,7 +19,7 @@ jobs: - name: install dependencies run: | sudo apt-get install ninja-build - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | diff --git a/.github/workflows/on_PR_linux_special_buils.yml b/.github/workflows/on_PR_linux_special_buils.yml index c46f717a7d..143c2f0e9a 100644 --- a/.github/workflows/on_PR_linux_special_buils.yml +++ b/.github/workflows/on_PR_linux_special_buils.yml @@ -16,7 +16,7 @@ jobs: - name: install dependencies run: | sudo apt-get install ninja-build - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | @@ -63,7 +63,7 @@ jobs: run: | sudo apt-get update sudo apt-get install valgrind ninja-build - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | @@ -100,7 +100,7 @@ jobs: - name: install dependencies run: | sudo apt-get install ninja-build - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | @@ -136,7 +136,7 @@ jobs: run: | sudo apt-get update sudo apt-get install valgrind doxygen graphviz gettext - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | diff --git a/.github/workflows/on_PR_windows_matrix.yml b/.github/workflows/on_PR_windows_matrix.yml index 4d04c6fcff..e7a2d6bcbb 100644 --- a/.github/workflows/on_PR_windows_matrix.yml +++ b/.github/workflows/on_PR_windows_matrix.yml @@ -46,7 +46,7 @@ jobs: - name: Install Conan & Common config run: | - pip.exe install "conan==1.53.0" + pip.exe install "conan==1.54.0" conan profile new --detect default conan profile update settings.build_type=${{matrix.build_type}} default conan profile update settings.compiler="Visual Studio" default diff --git a/.github/workflows/on_push_BasicWinLinMac.yml b/.github/workflows/on_push_BasicWinLinMac.yml index 6a0926d91a..6b0831ceb3 100644 --- a/.github/workflows/on_push_BasicWinLinMac.yml +++ b/.github/workflows/on_push_BasicWinLinMac.yml @@ -31,7 +31,7 @@ jobs: - name: Install Conan & Common config run: | - pip.exe install "conan==1.53.0" + pip.exe install "conan==1.54.0" conan config install https://github.com/conan-io/conanclientcert.git conan profile new --detect default conan profile show default @@ -77,7 +77,7 @@ jobs: - name: install dependencies run: | sudo apt-get install ninja-build - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan run: | diff --git a/.github/workflows/on_push_ExtraJobsForMain.yml b/.github/workflows/on_push_ExtraJobsForMain.yml index e122e59f7c..e7789bed7d 100644 --- a/.github/workflows/on_push_ExtraJobsForMain.yml +++ b/.github/workflows/on_push_ExtraJobsForMain.yml @@ -17,7 +17,7 @@ jobs: - name: install dependencies run: | - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0abf80bdc3..8ebe417867 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | sudo apt-get install ninja-build gettext doxygen graphviz - pip3 install conan==1.53.0 + pip3 install conan==1.54.0 - name: Conan common config run: | @@ -110,7 +110,7 @@ jobs: - name: Install Conan & Common config run: | - pip.exe install "conan==1.53.0" + pip.exe install "conan==1.54.0" conan config install https://github.com/conan-io/conanclientcert.git conan profile new --detect default conan profile update settings.build_type=Release default diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 467ce2051f..8b6e9adcd6 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -930,6 +930,13 @@ namespace Exiv2 { uint32_t size, ByteOrder /*byteOrder*/) { + // FIXME: workaround for overwritten OM System header in Olympus files (https://github.com/Exiv2/exiv2/issues/2542) + if (size >= 14 && std::string(reinterpret_cast(pData), 14) + == std::string("OM SYSTEM\0\0\0II", 14)) { + // Require at least the header and an IFD with 1 entry + if (size < OMSystemMnHeader::sizeOfSignature() + 18) return 0; + return newOMSystemMn2(tag, group, olympus2Id); + } if (size < 10 || std::string(reinterpret_cast(pData), 10) != std::string("OLYMPUS\0II", 10)) { // Require at least the header and an IFD with 1 entry diff --git a/test/data/poc_2542.exv b/test/data/poc_2542.exv new file mode 100644 index 0000000000..da7dee85d8 Binary files /dev/null and b/test/data/poc_2542.exv differ diff --git a/tests/bugfixes/github/test_issue_2542.py b/tests/bugfixes/github/test_issue_2542.py new file mode 100644 index 0000000000..6790ff9999 --- /dev/null +++ b/tests/bugfixes/github/test_issue_2542.py @@ -0,0 +1,15 @@ +from system_tests import CaseMeta, path + +class OMSystemMakerNoteAlias(metaclass=CaseMeta): + """ + Regression test for the bug described in: + https://github.com/Exiv2/exiv2/issues/2542 + """ + url = "https://github.com/Exiv2/exiv2/issues/2542" + + filename = path("$data_path/poc_2542.exv") + commands = ["$exiv2 -q -K Exif.Olympus2.CameraID $filename"] + stdout = ["""Exif.Olympus2.CameraID Undefined 32 OLYMPUS DIGITAL CAMERA +"""] + stderr = [""] + retval = [0]