From 05f56e95afa93add729067a74c4a94ba3273f9c8 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Fri, 14 Oct 2016 10:26:11 +0000 Subject: [PATCH] #1242 Issue warning when we encounter erroneous Exif\0\0 in the Exif UUID box. --- include/exiv2/jp2image.hpp | 17 ++++++----------- src/jp2image.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/exiv2/jp2image.hpp b/include/exiv2/jp2image.hpp index 09cc75a4..77318a91 100644 --- a/include/exiv2/jp2image.hpp +++ b/include/exiv2/jp2image.hpp @@ -18,17 +18,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ -/*! - @file jp2image.hpp - @brief JPEG-2000 image, implemented using the following references: - ISO/IEC JTC 1/SC 29/WG1 N2401: JPEG 2000 Part 6 FCD 15444-6
- @version $Rev: 3091 $ - @author Gilles Caulier (cgilles) - caulier dot gilles at gmail dot com - @author Marco Piovanelli, Ovolab (marco) - marco.piovanelli@pobox.com - @date 12-Mar-2007, marco: created - */ + +/* + File: jp2image.cpp + Version: $Rev: 4629 $ +*/ + #ifndef JP2IMAGE_HPP_ #define JP2IMAGE_HPP_ diff --git a/src/jp2image.cpp b/src/jp2image.cpp index d11d2bd6..e0e8e9c6 100644 --- a/src/jp2image.cpp +++ b/src/jp2image.cpp @@ -18,10 +18,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. */ + /* File: jp2image.cpp Version: $Rev$ - */ +*/ + // ***************************************************************************** #include "rcsid_int.hpp" EXIV2_RCSID("@(#) $Id$") @@ -344,6 +346,10 @@ namespace Exiv2 if (memcmp(exifHeader, &rawData.pData_[i], sizeof(exifHeader)) == 0) { pos = i+sizeof(exifHeader); +#ifndef SUPPRESS_WARNINGS + EXV_WARNING << "Reading non-standard UUID-EXIF_bad box in " << io_->path() << std::endl; +#endif + } } @@ -631,7 +637,7 @@ namespace Exiv2 box.type = getLong(bheaderBuf.pData_ + 4, bigEndian); #ifdef DEBUG - std::cout << "Exiv2::Jp2Image::doWriteMetadata: Find box type: " << bheaderBuf.pData_ + 4 + std::cout << "Exiv2::Jp2Image::doWriteMetadata: box type: " << toAscii(box.type) << " length: " << box.length << std::endl; #endif