[med-svn] [Git][med-team/vtk-dicom][master] 2 commits: d/patches: Fix bug in parsing multi-value SpecificCharacterSet

Mathieu Malaterre (@malat) gitlab at salsa.debian.org
Wed Oct 29 13:43:55 GMT 2025



Mathieu Malaterre pushed to branch master at Debian Med / vtk-dicom


Commits:
ab078d92 by Mathieu Malaterre at 2025-10-29T14:39:30+01:00
d/patches: Fix bug in parsing multi-value SpecificCharacterSet

- - - - -
4711bb1c by Mathieu Malaterre at 2025-10-29T14:41:46+01:00
d/changelog: Upload 0.8.17-2 to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/af20bb4928ca8497107cb3595fa06fe02b7ba527.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+vtk-dicom (0.8.17-2) unstable; urgency=medium
+
+  * Team upload.
+  * d/patches: Fix bug in parsing multi-value SpecificCharacterSet
+
+ -- Mathieu Malaterre <malat at debian.org>  Wed, 29 Oct 2025 14:41:17 +0100
+
 vtk-dicom (0.8.17-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/af20bb4928ca8497107cb3595fa06fe02b7ba527.patch
=====================================
@@ -0,0 +1,46 @@
+From af20bb4928ca8497107cb3595fa06fe02b7ba527 Mon Sep 17 00:00:00 2001
+From: David Gobbi <david.gobbi at gmail.com>
+Date: Tue, 28 Oct 2025 07:24:57 -0600
+Subject: [PATCH] Fix bug in parsing multi-value SpecificCharacterSet
+
+The first value of SpecificCharacterSet could be ignored in some
+circumstances where it is needed.
+---
+ Source/vtkDICOMCharacterSet.cxx | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/Source/vtkDICOMCharacterSet.cxx b/Source/vtkDICOMCharacterSet.cxx
+index 625a7d90..f731a449 100644
+--- a/Source/vtkDICOMCharacterSet.cxx
++++ b/Source/vtkDICOMCharacterSet.cxx
+@@ -3317,19 +3317,26 @@ unsigned char vtkDICOMCharacterSet::KeyFromString(const char *name, size_t nl)
+           }
+           else if (beginsWithBackslash)
+           {
+-            if ((i & DICOM_JP_BITS) == i)
++            if (((key | i) & DICOM_JP_BITS) == (key | i))
+             {
+               // combine key with 2nd, 3rd value of SpecificCharacterSet
+               // (specific to ISO_2022_IR_87 and ISO_2022_IR_159, which
+               // combine with ISO_2022_IR_13 and with each other)
+-              key = (key & DICOM_JP_BITS) | i;
++              key |= i;
+             }
+-            else
++            else if (key == ISO_IR_6 || (key == ISO_2022_IR_6 &&
++                     (i & ISO_2022_MAX) == (i | ISO_2022_MIN)))
+             {
+-              // set key from 2nd value of SpecificCharacterSet
++              // replace previous values with the current value
+               // (specific to ISO_2022_IR_58 and ISO_2022_IR_149)
+               key = i;
+             }
++            else if (((key | i) & ISO_2022_MAX) == ((key | i) | ISO_2022_MIN))
++            {
++              // if all values encountered so far can be used with ISO 2022,
++              // then enable ISO 2022 and use first value as default
++              key |= ISO_2022_MIN;
++            }
+           }
+           break;
+         }


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 # 01_reproducable_build_datetime.patch
+af20bb4928ca8497107cb3595fa06fe02b7ba527.patch



View it on GitLab: https://salsa.debian.org/med-team/vtk-dicom/-/compare/80be434f6e060b9ad2e9a4e7784751d83f5de7c9...4711bb1c3a36e297cf0566a9ce6677a3f25c0933

-- 
View it on GitLab: https://salsa.debian.org/med-team/vtk-dicom/-/compare/80be434f6e060b9ad2e9a4e7784751d83f5de7c9...4711bb1c3a36e297cf0566a9ce6677a3f25c0933
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20251029/9c0558dd/attachment-0001.htm>


More information about the debian-med-commit mailing list