From adfc01f2e0a15a165d5332b04d337fb8691913b4 Mon Sep 17 00:00:00 2001 From: D4N Date: Sun, 31 Mar 2019 09:41:11 +0200 Subject: [PATCH] Update tests/bugfixes/github/test_issue_742.py Co-Authored-By: piponazo (cherry picked from commit 39d8904696338d5bd4a9c7e9a96a798a791d0973) --- src/jp2image.cpp | 23 +---------------------- tests/bugfixes/github/test_issue_742.py | 2 +- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/jp2image.cpp b/src/jp2image.cpp index 6b0d8ada..7c270486 100644 --- a/src/jp2image.cpp +++ b/src/jp2image.cpp @@ -469,7 +469,6 @@ namespace Exiv2 out << " address | length | box | data" << std::endl; } -<<<<<<< HEAD if ( bPrint || bXMP || bICC || bIPTCErase ) { long position = 0; @@ -481,16 +480,6 @@ namespace Exiv2 while (box.length && box.type != kJp2BoxTypeClose && io_->read((byte*)&box, sizeof(box)) == sizeof(box)) { position = io_->tell(); -======= - if (bPrint || bXMP || bICC || bIPTCErase) { - Jp2BoxHeader box = {1, 1}; - Jp2BoxHeader subBox = {1, 1}; - Jp2UuidBox uuid = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; - bool bLF = false; - - while (box.length && box.type != kJp2BoxTypeClose && io_->read((byte*)&box, sizeof(box)) == sizeof(box)) { - long position = io_->tell(); ->>>>>>> b6e4ca0a8... clang-format Jp2Image::printStructure() box.length = getLong((byte*)&box.length, bigEndian); box.type = getLong((byte*)&box.type, bigEndian); @@ -582,21 +571,11 @@ namespace Exiv2 } lf(out, bLF); -<<<<<<< HEAD - if(bIsExif && bRecursive && rawData.size_ > 0) - { - if ( (rawData.pData_[0] == rawData.pData_[1]) - && (rawData.pData_[0]=='I' || rawData.pData_[0]=='M' ) - ) { - BasicIo::AutoPtr p = BasicIo::AutoPtr(new MemIo(rawData.pData_,rawData.size_)); - printTiffStructure(*p,out,option,depth); -======= if (bIsExif && bRecursive && rawData.size_ > 0) { if ((rawData.pData_[0] == rawData.pData_[1]) && (rawData.pData_[0] == 'I' || rawData.pData_[0] == 'M')) { - BasicIo::UniquePtr p = BasicIo::UniquePtr(new MemIo(rawData.pData_, rawData.size_)); + BasicIo::AutoPtr p = BasicIo::AutoPtr(new MemIo(rawData.pData_, rawData.size_)); printTiffStructure(*p, out, option, depth); ->>>>>>> b6e4ca0a8... clang-format Jp2Image::printStructure() } } diff --git a/tests/bugfixes/github/test_issue_742.py b/tests/bugfixes/github/test_issue_742.py index 6aa4a339..363e616b 100644 --- a/tests/bugfixes/github/test_issue_742.py +++ b/tests/bugfixes/github/test_issue_742.py @@ -8,7 +8,7 @@ class ThrowsWhenSubBoxLengthIsNotGood(metaclass=system_tests.CaseMeta): filename = system_tests.path("$data_path/issue_742_poc") commands = ["$exiv2 -pX $filename"] stdout = [""] - stderr = ["""$exiv2_exception_message """ + filename + """: + stderr = ["""$exiv2_exception_message $filename: $kerCorruptedMetadata """] retval = [1]