# HG changeset patch # User Alain Mazy # Date 1775222376 -7200 # Node ID a202510220c61b822b1a4df4666364ade30f4b32 # Parent 5aa6a0854de98b2a7f5fac07862cf3568717e67d added verbose info to understand failures on 32bits proc diff -r 5aa6a0854de9 -r a202510220c6 OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp --- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Fri Apr 03 12:36:34 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Fri Apr 03 15:19:36 2026 +0200 @@ -488,7 +488,7 @@ if (totalFrameSize > MAX_FRAME_SIZE || static_cast(static_cast(totalFrameSize)) != totalFrameSize) { - throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow"); + throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow (" + boost::lexical_cast(totalFrameSize) + " vs " + boost::lexical_cast(MAX_FRAME_SIZE) + ")"); } else { diff -r 5aa6a0854de9 -r a202510220c6 OrthancFramework/Sources/Images/PamReader.cpp --- a/OrthancFramework/Sources/Images/PamReader.cpp Fri Apr 03 12:36:34 2026 +0200 +++ b/OrthancFramework/Sources/Images/PamReader.cpp Fri Apr 03 15:19:36 2026 +0200 @@ -191,7 +191,6 @@ PixelFormat format; GetPixelFormat(format, bytesPerChannel, maxValue, channelCount, tupleType); - // unsigned int pitch = width * channelCount * bytesPerChannel; uint64_t pitch = static_cast(width) * channelCount * bytesPerChannel; if (pitch > std::numeric_limits::max()) @@ -203,7 +202,7 @@ if (totalSize > MAX_PAM_IMAGE_BUFFER_SIZE || static_cast(static_cast(totalSize)) != totalSize) { - throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large"); + throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large (" + boost::lexical_cast(totalSize) + " vs " + boost::lexical_cast(MAX_PAM_IMAGE_BUFFER_SIZE) + ")"); } if (content_.size() != header.size() + headerDelimiter.size() + pitch * height)