# HG changeset patch # User Sebastien Jodogne # Date 1792679127 -7200 # Node ID 5bfcb432ad3d46037323ed48b48bd140ae2c472c # Parent fe50e37b83eab5a9cf1ee4484abdc3b3d5f26b12 setting DCMTK_MAX_SEQUENCE_NESTING to 32 diff -r fe50e37b83ea -r 5bfcb432ad3d NEWS --- a/NEWS Thu Oct 22 15:32:11 2026 +0200 +++ b/NEWS Thu Oct 22 16:25:27 2026 +0200 @@ -48,6 +48,7 @@ * New CMake options: - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from. - "ORTHANC_SOURCES_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the Orthanc sources from. +* Setting DCMTK_MAX_SEQUENCE_NESTING to 32 * Upgraded dependencies for static builds: - dcmtk 3.7.1 - openssl 3.5.9 (LTS branch) diff -r fe50e37b83ea -r 5bfcb432ad3d OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.1.cmake --- a/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.1.cmake Thu Oct 22 15:32:11 2026 +0200 +++ b/OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.7.1.cmake Thu Oct 22 16:25:27 2026 +0200 @@ -318,3 +318,17 @@ if (DCMTK_LOCALE_BACKEND STREQUAL "oficonv") AUX_SOURCE_DIRECTORY(${DCMTK_SOURCES_DIR}/oficonv/libsrc DCMTK_SOURCES) endif() + + +# 2026-10-22: On several GNU/Linux distributions (notably Ubuntu +# 22.04), Orthanc was observed to crash when using the system-wide +# civetweb library and allowing DCMTK to process sequences nested up +# to 37 levels deep. This issue can be reproduced using the DICOM +# sample file +# "orthanc-tests/Database/2026-05-06-Deeply-Nested-Sequence.dcm". The +# issue does not occur when civetweb is statically linked by setting +# "-DUSE_SYSTEM_CIVETWEB=OFF". The exact cause for this difference is +# unknown, but it appears to be related to stack management across +# shared libraries. We therefore limit the maximum nesting depth to 32 +# levels. +add_definitions(-DDCMTK_MAX_SEQUENCE_NESTING=32)