Mercurial > hg > orthanc
changeset 6671:a202510220c6
added verbose info to understand failures on 32bits proc
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Fri, 03 Apr 2026 15:19:36 +0200 |
| parents | 5aa6a0854de9 |
| children | 80ef5859b6e2 |
| files | OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp OrthancFramework/Sources/Images/PamReader.cpp |
| diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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<uint64_t>(static_cast<size_t>(totalFrameSize)) != totalFrameSize) { - throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow"); + throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow (" + boost::lexical_cast<std::string>(totalFrameSize) + " vs " + boost::lexical_cast<std::string>(MAX_FRAME_SIZE) + ")"); } else {
--- 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<uint64_t>(width) * channelCount * bytesPerChannel; if (pitch > std::numeric_limits<unsigned int>::max()) @@ -203,7 +202,7 @@ if (totalSize > MAX_PAM_IMAGE_BUFFER_SIZE || static_cast<uint64_t>(static_cast<size_t>(totalSize)) != totalSize) { - throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large"); + throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large (" + boost::lexical_cast<std::string>(totalSize) + " vs " + boost::lexical_cast<std::string>(MAX_PAM_IMAGE_BUFFER_SIZE) + ")"); } if (content_.size() != header.size() + headerDelimiter.size() + pitch * height)
