From 6685b8db4a54b4ff41644ad944f26d2f332a06c3 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Thu, 24 Jun 2021 10:38:19 +0100 Subject: [PATCH] Print message to stderr when EXIV2_DEBUG_MESSAGES is enabled. --- src/crwimage_int.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp index 3a0347a6..fd139271 100644 --- a/src/crwimage_int.cpp +++ b/src/crwimage_int.cpp @@ -1236,6 +1236,10 @@ namespace Exiv2 { if (s <= size) { if (len < s) len = s; exif.copy(buf.pData_ + exif.tag() * 2, byteOrder); + } else { +#ifdef EXIV2_DEBUG_MESSAGES + std::cerr << "packIfdId out-of-bounds error: s = " << std::dec << s << "\n"; +#endif } } // Round the size to make it even.