[med-svn] [Git][med-team/dcmtk][master] 5 commits: 0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Sat Jan 18 15:59:12 GMT 2025
Étienne Mollier pushed to branch master at Debian Med / dcmtk
Commits:
1c2a261c by Étienne Mollier at 2025-01-18T11:54:16+01:00
0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch
Patch refreshed.
- - - - -
8f993d58 by Étienne Mollier at 2025-01-18T11:54:32+01:00
0004-Fixed-two-segmentation-faults.patch: unfuzz.
- - - - -
751fc511 by Étienne Mollier at 2025-01-18T15:58:31+01:00
0007-CVE-2024-47796.patch: new.
This patch addresses CVE-2024-47796.
Closes: #1093043
- - - - -
237485bb by Étienne Mollier at 2025-01-18T16:00:29+01:00
0008-CVE-2024-52333.patch: new.
This patch addresses CVE-2024-52333.
Closes: #1093047
- - - - -
b96ce748 by Étienne Mollier at 2025-01-18T16:58:27+01:00
d/changelog: ready for upload to unstable.
- - - - -
6 changed files:
- debian/changelog
- debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch
- debian/patches/0004-Fixed-two-segmentation-faults.patch
- + debian/patches/0007-CVE-2024-47796.patch
- + debian/patches/0008-CVE-2024-52333.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+dcmtk (3.6.8-7) unstable; urgency=medium
+
+ * Team upload.
+ * 0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch.
+ Patch refreshed.
+ * 0004-Fixed-two-segmentation-faults.patch: unfuzz.
+ * 0007-CVE-2024-47796.patch: new.
+ This patch addresses CVE-2024-47796. (Closes: #1093043)
+ * 0008-CVE-2024-52333.patch: new.
+ This patch addresses CVE-2024-52333. (Closes: #1093047)
+
+ -- Étienne Mollier <emollier at debian.org> Sat, 18 Jan 2025 16:30:29 +0100
+
dcmtk (3.6.8-6) unstable; urgency=medium
* d/t/run-unit-test: Fix unit-test for new release. Closes: #1075917
=====================================
debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch
=====================================
@@ -54,16 +54,8 @@ value representation.
mode change 100755 => 100644 dcmdata/apps/stl2dcm.cc
mode change 100755 => 100644 dcmdata/include/dcmtk/dcmdata/dcencdoc.h
-diff --git a/dcmdata/apps/cda2dcm.cc b/dcmdata/apps/cda2dcm.cc
-old mode 100755
-new mode 100644
-diff --git a/dcmdata/apps/stl2dcm.cc b/dcmdata/apps/stl2dcm.cc
-old mode 100755
-new mode 100644
-diff --git a/dcmdata/include/dcmtk/dcmdata/dcelem.h b/dcmdata/include/dcmtk/dcmdata/dcelem.h
-index b6ffeb7eb0..2978e96180 100644
---- a/dcmdata/include/dcmtk/dcmdata/dcelem.h
-+++ b/dcmdata/include/dcmtk/dcmdata/dcelem.h
+--- dcmtk.orig/dcmdata/include/dcmtk/dcmdata/dcelem.h
++++ dcmtk/dcmdata/include/dcmtk/dcmdata/dcelem.h
@@ -1,6 +1,6 @@
/*
*
@@ -72,7 +64,7 @@ index b6ffeb7eb0..2978e96180 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -144,6 +144,11 @@ class DCMTK_DCMDATA_EXPORT DcmElement
+@@ -144,6 +144,11 @@
*/
virtual OFBool isLeaf() const { return OFTrue; }
@@ -84,13 +76,8 @@ index b6ffeb7eb0..2978e96180 100644
/** check if value of this element is loaded into main memory
* @return true if value is present in memory, false if value still resides in file
*/
-diff --git a/dcmdata/include/dcmtk/dcmdata/dcencdoc.h b/dcmdata/include/dcmtk/dcmdata/dcencdoc.h
-old mode 100755
-new mode 100644
-diff --git a/dcmdata/include/dcmtk/dcmdata/dcobject.h b/dcmdata/include/dcmtk/dcmdata/dcobject.h
-index 60490f6bc8..714520bcf5 100644
---- a/dcmdata/include/dcmtk/dcmdata/dcobject.h
-+++ b/dcmdata/include/dcmtk/dcmdata/dcobject.h
+--- dcmtk.orig/dcmdata/include/dcmtk/dcmdata/dcobject.h
++++ dcmtk/dcmdata/include/dcmtk/dcmdata/dcobject.h
@@ -1,6 +1,6 @@
/*
*
@@ -99,7 +86,7 @@ index 60490f6bc8..714520bcf5 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -308,6 +308,11 @@ class DCMTK_DCMDATA_EXPORT DcmObject
+@@ -308,6 +308,11 @@
*/
virtual OFBool isLeaf() const = 0;
@@ -111,11 +98,9 @@ index 60490f6bc8..714520bcf5 100644
/** check if this element is nested in a sequence of items, i.e.\ not a
* top-level or stand-alone element
* @return true if this element is nested, false otherwise
-diff --git a/dcmdata/libsrc/dcddirif.cc b/dcmdata/libsrc/dcddirif.cc
-index a0aec59b96..69d0993e5f 100644
---- a/dcmdata/libsrc/dcddirif.cc
-+++ b/dcmdata/libsrc/dcddirif.cc
-@@ -433,7 +433,7 @@ static OFBool compareItems(DcmItem *item1,
+--- dcmtk.orig/dcmdata/libsrc/dcddirif.cc
++++ dcmtk/dcmdata/libsrc/dcddirif.cc
+@@ -433,7 +433,7 @@
OFBool first = OFTrue;
DcmStack stack1, stack2;
/* check whether attributes are equal */
@@ -124,7 +109,7 @@ index a0aec59b96..69d0993e5f 100644
{
if (!compareAttributes(OFstatic_cast(DcmElement *, stack1.top()), OFstatic_cast(DcmElement *, stack2.top()), fromSequence, i++, reason))
break;
-@@ -5457,7 +5457,7 @@ OFBool DicomDirInterface::warnAboutInconsistentAttributes(DcmDirectoryRecord *re
+@@ -5586,7 +5586,7 @@
OFBool first = OFTrue;
DcmElement *delem = NULL;
/* iterate over all record elements */
@@ -133,11 +118,9 @@ index a0aec59b96..69d0993e5f 100644
{
delem = OFstatic_cast(DcmElement *, stack.top());
if ((delem != NULL) && (delem->getLength() > 0))
-diff --git a/dcmdata/libsrc/dcdirrec.cc b/dcmdata/libsrc/dcdirrec.cc
-index a6a2fc4858..c374c34742 100644
---- a/dcmdata/libsrc/dcdirrec.cc
-+++ b/dcmdata/libsrc/dcdirrec.cc
-@@ -998,7 +998,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil
+--- dcmtk.orig/dcmdata/libsrc/dcdirrec.cc
++++ dcmtk/dcmdata/libsrc/dcdirrec.cc
+@@ -1007,7 +1007,7 @@
DCMDATA_ERROR("Internal ERROR in DcmDirectoryRecord::fillElementsAndReadSOP()");
}
uiP = new DcmUniqueIdentifier(refSOPClassTag); // (0004,1510)
@@ -146,7 +129,7 @@ index a6a2fc4858..c374c34742 100644
{
char *uid = NULL;
OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid);
-@@ -1011,7 +1011,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil
+@@ -1020,7 +1020,7 @@
insert(uiP, OFTrue);
uiP = new DcmUniqueIdentifier(refSOPInstTag); // (0004,1511)
@@ -155,7 +138,7 @@ index a6a2fc4858..c374c34742 100644
{
char *uid = NULL;
OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid);
-@@ -1024,7 +1024,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil
+@@ -1033,7 +1033,7 @@
insert(uiP, OFTrue);
uiP = new DcmUniqueIdentifier(refFileXferTag); // (0004,1512)
@@ -164,10 +147,8 @@ index a6a2fc4858..c374c34742 100644
{
char *uid = NULL;
OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid);
-diff --git a/dcmdata/libsrc/dcfilefo.cc b/dcmdata/libsrc/dcfilefo.cc
-index 4f72dee83d..5771e604cc 100644
---- a/dcmdata/libsrc/dcfilefo.cc
-+++ b/dcmdata/libsrc/dcfilefo.cc
+--- dcmtk.orig/dcmdata/libsrc/dcfilefo.cc
++++ dcmtk/dcmdata/libsrc/dcfilefo.cc
@@ -1,6 +1,6 @@
/*
*
@@ -176,7 +157,7 @@ index 4f72dee83d..5771e604cc 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -362,7 +362,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo,
+@@ -362,7 +362,7 @@
{
if ((writeMode == EWM_updateMeta) || (elem->getLength() == 0))
{
@@ -185,7 +166,7 @@ index 4f72dee83d..5771e604cc 100644
{
char *uid = NULL;
l_error = OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid);
-@@ -378,7 +378,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo,
+@@ -378,7 +378,7 @@
else if (DCM_dcmdataLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL))
{
// check whether UID in meta-header is identical to the one in the dataset
@@ -194,7 +175,7 @@ index 4f72dee83d..5771e604cc 100644
{
OFString uidDataset, uidMetaHeader;
OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getOFStringArray(uidDataset);
-@@ -404,7 +404,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo,
+@@ -404,7 +404,7 @@
{
if ((writeMode == EWM_updateMeta) || (elem->getLength() == 0))
{
@@ -203,7 +184,7 @@ index 4f72dee83d..5771e604cc 100644
{
char* uid = NULL;
l_error = OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid);
-@@ -422,7 +422,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo,
+@@ -422,7 +422,7 @@
else if (DCM_dcmdataLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL))
{
// check whether UID in meta-header is identical to the one in the dataset
@@ -212,7 +193,7 @@ index 4f72dee83d..5771e604cc 100644
{
OFString uidDataset, uidMetaHeader;
OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getOFStringArray(uidDataset);
-@@ -633,7 +633,7 @@ E_TransferSyntax DcmFileFormat::lookForXfer(DcmMetaInfo *metainfo)
+@@ -633,7 +633,7 @@
/* check whether meta header is present (and non-empty, i.e. contains elements) */
if (metainfo && !metainfo->isEmpty())
{
@@ -221,10 +202,8 @@ index 4f72dee83d..5771e604cc 100644
{
DcmUniqueIdentifier *xferUI = OFstatic_cast(DcmUniqueIdentifier *, stack.top());
if (xferUI->getTag() == DCM_TransferSyntaxUID)
-diff --git a/dcmdata/libsrc/dcitem.cc b/dcmdata/libsrc/dcitem.cc
-index 3960fceb45..51f95d21dd 100644
---- a/dcmdata/libsrc/dcitem.cc
-+++ b/dcmdata/libsrc/dcitem.cc
+--- dcmtk.orig/dcmdata/libsrc/dcitem.cc
++++ dcmtk/dcmdata/libsrc/dcitem.cc
@@ -1,6 +1,6 @@
/*
*
@@ -233,7 +212,7 @@ index 3960fceb45..51f95d21dd 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -2332,7 +2332,7 @@ OFBool DcmItem::tagExistsWithValue(const DcmTagKey &key,
+@@ -2332,7 +2332,7 @@
DcmStack stack;
OFBool result = OFFalse;
@@ -242,7 +221,7 @@ index 3960fceb45..51f95d21dd 100644
{
DcmElement *elem = OFstatic_cast(DcmElement *, stack.top());
if (elem != NULL)
-@@ -2355,7 +2355,7 @@ OFCondition DcmItem::findAndGetElement(const DcmTagKey &tagKey,
+@@ -2355,7 +2355,7 @@
DcmStack stack;
/* find the element */
OFCondition status = search(tagKey, stack, ESM_fromHere, searchIntoSub);
@@ -251,7 +230,7 @@ index 3960fceb45..51f95d21dd 100644
{
element = OFstatic_cast(DcmElement *, stack.top());
/* should never happen but ... */
-@@ -2990,7 +2990,7 @@ OFCondition DcmItem::findAndGetSequence(const DcmTagKey &seqTagKey,
+@@ -2990,7 +2990,7 @@
DcmStack stack;
/* find the element */
OFCondition status = search(seqTagKey, stack, ESM_fromHere, searchIntoSub);
@@ -260,7 +239,7 @@ index 3960fceb45..51f95d21dd 100644
{
DcmElement *delem = OFstatic_cast(DcmElement *, stack.top());
/* should never happen but ... */
-@@ -3027,7 +3027,7 @@ OFCondition DcmItem::findAndGetSequenceItem(const DcmTagKey &seqTagKey,
+@@ -3027,7 +3027,7 @@
DcmStack stack;
/* find sequence */
OFCondition status = search(seqTagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -269,7 +248,7 @@ index 3960fceb45..51f95d21dd 100644
{
/* get element */
DcmElement *delem = OFstatic_cast(DcmElement *, stack.top());
-@@ -3089,7 +3089,7 @@ OFCondition DcmItem::findOrCreateSequenceItem(const DcmTag& seqTag,
+@@ -3089,7 +3089,7 @@
OFCondition status = search(seqTag, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
DcmSequenceOfItems *sequence = NULL;
/* sequence found? */
@@ -278,7 +257,7 @@ index 3960fceb45..51f95d21dd 100644
{
/* get element */
DcmElement *delem = OFstatic_cast(DcmElement *, stack.top());
-@@ -3223,7 +3223,7 @@ OFCondition DcmItem::findAndDeleteSequenceItem(const DcmTagKey &seqTagKey,
+@@ -3223,7 +3223,7 @@
DcmStack stack;
/* find sequence */
OFCondition status = search(seqTagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -287,7 +266,7 @@ index 3960fceb45..51f95d21dd 100644
{
/* get element */
DcmElement *delem = OFstatic_cast(DcmElement *, stack.top());
-@@ -4224,7 +4224,7 @@ OFCondition DcmItem::insertSequenceItem(const DcmTag &seqTag,
+@@ -4224,7 +4224,7 @@
status = search(seqTag, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
DcmSequenceOfItems *sequence = NULL;
/* sequence found? */
@@ -296,11 +275,9 @@ index 3960fceb45..51f95d21dd 100644
{
/* get element */
DcmElement *delem = OFstatic_cast(DcmElement *, stack.top());
-diff --git a/dcmimgle/libsrc/didocu.cc b/dcmimgle/libsrc/didocu.cc
-index b63f77258a..efbbd69fbd 100644
---- a/dcmimgle/libsrc/didocu.cc
-+++ b/dcmimgle/libsrc/didocu.cc
-@@ -217,7 +217,7 @@ DcmElement *DiDocument::search(const DcmTagKey &tag,
+--- dcmtk.orig/dcmimgle/libsrc/didocu.cc
++++ dcmtk/dcmimgle/libsrc/didocu.cc
+@@ -218,7 +218,7 @@
obj = Object;
// only search on main dataset level
if ((obj != NULL) && (obj->search(tag, stack, ESM_fromHere, OFFalse /* searchIntoSub */) == EC_Normal) &&
@@ -309,11 +286,9 @@ index b63f77258a..efbbd69fbd 100644
{
return OFstatic_cast(DcmElement *, stack.top());
}
-diff --git a/dcmiod/libsrc/iodutil.cc b/dcmiod/libsrc/iodutil.cc
-index bd3dc87913..64c985cb50 100644
---- a/dcmiod/libsrc/iodutil.cc
-+++ b/dcmiod/libsrc/iodutil.cc
-@@ -43,7 +43,7 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(
+--- dcmtk.orig/dcmiod/libsrc/iodutil.cc
++++ dcmtk/dcmiod/libsrc/iodutil.cc
+@@ -43,7 +43,7 @@
DcmStack stack;
const DcmTagKey tagKey = delem.getTag();
OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -322,7 +297,7 @@ index bd3dc87913..64c985cb50 100644
{
/* copy object from search stack */
result = delem.copyFrom(*stack.top());
-@@ -76,7 +76,7 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem& dataset,
+@@ -76,7 +76,7 @@
DcmStack stack;
OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -331,10 +306,8 @@ index bd3dc87913..64c985cb50 100644
{
/* copy object from search stack */
delem = OFstatic_cast(DcmElement*, stack.top()->clone());
-diff --git a/dcmjpeg/libsrc/djcodece.cc b/dcmjpeg/libsrc/djcodece.cc
-index 4128a20402..d0371f6c2b 100644
---- a/dcmjpeg/libsrc/djcodece.cc
-+++ b/dcmjpeg/libsrc/djcodece.cc
+--- dcmtk.orig/dcmjpeg/libsrc/djcodece.cc
++++ dcmtk/dcmjpeg/libsrc/djcodece.cc
@@ -1,6 +1,6 @@
/*
*
@@ -343,7 +316,7 @@ index 4128a20402..d0371f6c2b 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -1399,17 +1399,17 @@ OFCondition DJCodecEncoder::correctVOIWindows(
+@@ -1399,17 +1399,17 @@
DcmElement *explanation = NULL;
DcmStack stack;
@@ -364,10 +337,8 @@ index 4128a20402..d0371f6c2b 100644
{
explanation = OFreinterpret_cast(DcmElement*, stack.top());
}
-diff --git a/dcmnet/apps/storescu.cc b/dcmnet/apps/storescu.cc
-index e2c3b29395..bd7f1cd61f 100644
---- a/dcmnet/apps/storescu.cc
-+++ b/dcmnet/apps/storescu.cc
+--- dcmtk.orig/dcmnet/apps/storescu.cc
++++ dcmtk/dcmnet/apps/storescu.cc
@@ -1,6 +1,6 @@
/*
*
@@ -376,7 +347,7 @@ index e2c3b29395..bd7f1cd61f 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -1138,6 +1138,12 @@ updateStringAttributeValue(DcmItem *dataset, const DcmTagKey &key, OFString &val
+@@ -1138,6 +1138,12 @@
return OFFalse;
}
@@ -389,11 +360,9 @@ index e2c3b29395..bd7f1cd61f 100644
DcmElement *elem = OFstatic_cast(DcmElement *, stack.top());
DcmVR vr(elem->ident());
-diff --git a/dcmnet/libsrc/dimcmd.cc b/dcmnet/libsrc/dimcmd.cc
-index ffd225f4b9..3bcfae5e4f 100644
---- a/dcmnet/libsrc/dimcmd.cc
-+++ b/dcmnet/libsrc/dimcmd.cc
-@@ -191,14 +191,16 @@ addString(DcmDataset *obj, DcmTagKey t, char *s, OFBool keepPadding)
+--- dcmtk.orig/dcmnet/libsrc/dimcmd.cc
++++ dcmtk/dcmnet/libsrc/dimcmd.cc
+@@ -191,14 +191,16 @@
static OFCondition
getString(DcmDataset *obj, DcmTagKey t, char *s, int maxlen, OFBool *spacePadded)
{
@@ -413,7 +382,7 @@ index ffd225f4b9..3bcfae5e4f 100644
if (elem->getLength() == 0) {
s[0] = '\0';
} else if (elem->getLength() > (Uint32)maxlen) {
-@@ -266,17 +268,19 @@ addUS(DcmDataset *obj, DcmTagKey t, Uint16 us)
+@@ -263,17 +265,19 @@
static OFCondition
getUS(DcmDataset *obj, DcmTagKey t, Uint16 *us)
{
@@ -437,7 +406,7 @@ index ffd225f4b9..3bcfae5e4f 100644
}
static OFCondition
-@@ -317,17 +321,19 @@ addUL(DcmDataset *obj, DcmTagKey t, Uint32 ul)
+@@ -314,17 +318,19 @@
static OFCondition
getUL(DcmDataset *obj, DcmTagKey t, Uint32 *ul)
{
@@ -461,7 +430,7 @@ index ffd225f4b9..3bcfae5e4f 100644
}
#if 0
-@@ -378,15 +384,17 @@ addAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 *lst, int listCount)
+@@ -375,15 +381,17 @@
static OFCondition
getAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 **lst, int *listCount)
{
@@ -482,7 +451,7 @@ index ffd225f4b9..3bcfae5e4f 100644
nBytes = elem->getLength();
*listCount = (int)(nBytes / sizeof(Uint16));
if (*listCount > 0) {
-@@ -398,7 +406,7 @@ getAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 **lst, int *listCount)
+@@ -395,7 +403,7 @@
}
}
@@ -491,11 +460,9 @@ index ffd225f4b9..3bcfae5e4f 100644
}
/*
-diff --git a/dcmnet/libsrc/diutil.cc b/dcmnet/libsrc/diutil.cc
-index 75111ae3bb..31c9645fcd 100644
---- a/dcmnet/libsrc/diutil.cc
-+++ b/dcmnet/libsrc/diutil.cc
-@@ -148,23 +148,21 @@ DU_stripLeadingAndTrailingSpaces(char *s)
+--- dcmtk.orig/dcmnet/libsrc/diutil.cc
++++ dcmtk/dcmnet/libsrc/diutil.cc
+@@ -159,23 +159,21 @@
OFBool
DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s, size_t bufsize)
{
@@ -524,7 +491,7 @@ index 75111ae3bb..31c9645fcd 100644
}
OFBool
-@@ -182,7 +180,7 @@ DU_putStringDOElement(DcmItem *obj, DcmTagKey t, const char *s)
+@@ -193,7 +191,7 @@
ec = obj->insert(e, OFTrue);
}
@@ -533,7 +500,7 @@ index 75111ae3bb..31c9645fcd 100644
}
OFBool
-@@ -190,15 +188,15 @@ DU_getShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 *us)
+@@ -201,15 +199,15 @@
{
DcmElement *elem;
DcmStack stack;
@@ -555,7 +522,7 @@ index 75111ae3bb..31c9645fcd 100644
}
OFBool
-@@ -215,7 +213,7 @@ DU_putShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 us)
+@@ -226,7 +224,7 @@
if (ec == EC_Normal) {
ec = obj->insert(e, OFTrue);
}
@@ -564,11 +531,9 @@ index 75111ae3bb..31c9645fcd 100644
}
OFBool
-diff --git a/dcmnet/libsrc/dstorscu.cc b/dcmnet/libsrc/dstorscu.cc
-index cbb3dcbe97..01024d5406 100644
---- a/dcmnet/libsrc/dstorscu.cc
-+++ b/dcmnet/libsrc/dstorscu.cc
-@@ -484,7 +484,7 @@ OFCondition DcmStorageSCU::addDicomFilesFromDICOMDIR(const OFFilename &filename,
+--- dcmtk.orig/dcmnet/libsrc/dstorscu.cc
++++ dcmtk/dcmnet/libsrc/dstorscu.cc
+@@ -484,7 +484,7 @@
OFFilename dirName;
OFStandard::getDirNameFromPath(dirName, filename, OFFalse /* assumeDirName */);
// iterate over all items (directory records) where ReferencedFileID is present
@@ -577,10 +542,8 @@ index cbb3dcbe97..01024d5406 100644
{
// make sure that the dataset and element pointer are there
if (stack.card() > 1)
-diff --git a/dcmpstat/apps/dcmmklut.cc b/dcmpstat/apps/dcmmklut.cc
-index 044a17b3af..6a72ed3843 100644
---- a/dcmpstat/apps/dcmmklut.cc
-+++ b/dcmpstat/apps/dcmmklut.cc
+--- dcmtk.orig/dcmpstat/apps/dcmmklut.cc
++++ dcmtk/dcmpstat/apps/dcmmklut.cc
@@ -1,6 +1,6 @@
/*
*
@@ -589,7 +552,7 @@ index 044a17b3af..6a72ed3843 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -971,7 +971,7 @@ int main(int argc, char *argv[])
+@@ -971,7 +971,7 @@
{
// search existing sequence
DcmStack stack;
@@ -598,7 +561,7 @@ index 044a17b3af..6a72ed3843 100644
dseq=(DcmSequenceOfItems *)stack.top();
}
if (dseq == NULL)
-@@ -992,7 +992,7 @@ int main(int argc, char *argv[])
+@@ -992,7 +992,7 @@
{
// search existing sequence
DcmStack stack;
@@ -607,10 +570,8 @@ index 044a17b3af..6a72ed3843 100644
dseq=(DcmSequenceOfItems *)stack.top();
}
if (dseq == NULL)
-diff --git a/dcmpstat/apps/dcmpschk.cc b/dcmpstat/apps/dcmpschk.cc
-index ada6b164a3..12826b23f7 100644
---- a/dcmpstat/apps/dcmpschk.cc
-+++ b/dcmpstat/apps/dcmpschk.cc
+--- dcmtk.orig/dcmpstat/apps/dcmpschk.cc
++++ dcmtk/dcmpstat/apps/dcmpschk.cc
@@ -1,6 +1,6 @@
/*
*
@@ -619,7 +580,7 @@ index ada6b164a3..12826b23f7 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -652,7 +652,11 @@ static OFString printAttribute(
+@@ -652,7 +652,11 @@
OFOStringStream str;
ec = dset->search(key, stack, ESM_fromHere, OFFalse);
@@ -632,11 +593,9 @@ index ada6b164a3..12826b23f7 100644
if (elem)
elem->print(str, DCMTypes::PF_shortenLongTagValues);
else
-diff --git a/dcmpstat/libsrc/dviface.cc b/dcmpstat/libsrc/dviface.cc
-index 259e1580e0..d3a84510df 100644
---- a/dcmpstat/libsrc/dviface.cc
-+++ b/dcmpstat/libsrc/dviface.cc
-@@ -1417,14 +1417,14 @@ OFBool DVInterface::createPStateCache()
+--- dcmtk.orig/dcmpstat/libsrc/dviface.cc
++++ dcmtk/dcmpstat/libsrc/dviface.cc
+@@ -1425,14 +1425,14 @@
if (reference != NULL)
{
DcmStack stack;
@@ -653,7 +612,7 @@ index 259e1580e0..d3a84510df 100644
{
char *value = NULL;
if ((*OFstatic_cast(DcmLongString *, stack.top())).getString(value) == EC_Normal)
-@@ -2835,12 +2835,12 @@ OFCondition DVInterface::saveFileFormatToDB(DcmFileFormat &fileformat)
+@@ -2843,12 +2843,12 @@
DcmDataset *dset = fileformat.getDataset();
if (dset)
{
@@ -668,7 +627,7 @@ index 259e1580e0..d3a84510df 100644
{
OFstatic_cast(DcmElement *, stack.top())->getString(classUID);
}
-@@ -3756,7 +3756,7 @@ OFCondition DVInterface::addToPrintHardcopyFromDB(const char *studyUID, const ch
+@@ -3764,7 +3764,7 @@
DVPSPresentationLUT presentationLUT;
if (EC_Normal != presentationLUT.read(*dataset, OFFalse)) presentationLUT.setType(DVPSP_identity);
result = dataset->search(sopclassuid.getTag(), stack, ESM_fromHere, OFFalse);
@@ -677,10 +636,8 @@ index 259e1580e0..d3a84510df 100644
{
char *sopclass = NULL;
sopclassuid = *OFstatic_cast(DcmUniqueIdentifier *, stack.top());
-diff --git a/dcmpstat/libsrc/dvpsabl.cc b/dcmpstat/libsrc/dvpsabl.cc
-index 62cc1d51b9..bbda18183e 100644
---- a/dcmpstat/libsrc/dvpsabl.cc
-+++ b/dcmpstat/libsrc/dvpsabl.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsabl.cc
++++ dcmtk/dcmpstat/libsrc/dvpsabl.cc
@@ -1,6 +1,6 @@
/*
*
@@ -689,7 +646,7 @@ index 62cc1d51b9..bbda18183e 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -69,7 +69,7 @@ OFCondition DVPSAnnotationContent_PList::read(DcmItem &dset)
+@@ -69,7 +69,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -698,10 +655,8 @@ index 62cc1d51b9..bbda18183e 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpscu.cc b/dcmpstat/libsrc/dvpscu.cc
-index be3c81fe04..02a19452f1 100644
---- a/dcmpstat/libsrc/dvpscu.cc
-+++ b/dcmpstat/libsrc/dvpscu.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpscu.cc
++++ dcmtk/dcmpstat/libsrc/dvpscu.cc
@@ -1,6 +1,6 @@
/*
*
@@ -710,7 +665,7 @@ index be3c81fe04..02a19452f1 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -80,14 +80,14 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
+@@ -80,14 +80,14 @@
/* first we look for the Curve Data */
DcmTagKey key(0x5000 + group,0x3000);
@@ -727,7 +682,7 @@ index be3c81fe04..02a19452f1 100644
{
d_curveDimensions = (DcmElement *)(stack.top());
} else return EC_IllegalCall;
-@@ -101,42 +101,42 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group)
+@@ -101,42 +101,42 @@
key.setElement(0x0010); // Number of Points
stack.clear();
@@ -776,10 +731,8 @@ index be3c81fe04..02a19452f1 100644
{
d_curveLabel = (DcmElement *)(stack.top());
}
-diff --git a/dcmpstat/libsrc/dvpsdal.cc b/dcmpstat/libsrc/dvpsdal.cc
-index 519aa977fd..969c182999 100644
---- a/dcmpstat/libsrc/dvpsdal.cc
-+++ b/dcmpstat/libsrc/dvpsdal.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsdal.cc
++++ dcmtk/dcmpstat/libsrc/dvpsdal.cc
@@ -1,6 +1,6 @@
/*
*
@@ -788,7 +741,7 @@ index 519aa977fd..969c182999 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -67,7 +67,7 @@ OFCondition DVPSDisplayedArea_PList::read(DcmItem &dset)
+@@ -67,7 +67,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -797,10 +750,8 @@ index 519aa977fd..969c182999 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsfs.cc b/dcmpstat/libsrc/dvpsfs.cc
-index 5a5173c155..ba311b258e 100644
---- a/dcmpstat/libsrc/dvpsfs.cc
-+++ b/dcmpstat/libsrc/dvpsfs.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsfs.cc
++++ dcmtk/dcmpstat/libsrc/dvpsfs.cc
@@ -1,6 +1,6 @@
/*
*
@@ -809,7 +760,7 @@ index 5a5173c155..ba311b258e 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -280,7 +280,7 @@ OFBool DVPSFilmSession::printSCPCreate(
+@@ -280,7 +280,7 @@
{
stack.clear();
@@ -818,7 +769,7 @@ index 5a5173c155..ba311b258e 100644
{
DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -480,7 +480,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -480,7 +480,7 @@
if (result)
{
stack.clear();
@@ -827,7 +778,7 @@ index 5a5173c155..ba311b258e 100644
{
numberOfCopies = *((DcmIntegerString *)(stack.top()));
Sint32 numCopies=0;
-@@ -502,7 +502,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -502,7 +502,7 @@
if (result)
{
stack.clear();
@@ -836,7 +787,7 @@ index 5a5173c155..ba311b258e 100644
{
printPriority = *((DcmCodeString *)(stack.top()));
OFString aString;
-@@ -523,7 +523,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -523,7 +523,7 @@
{
Uint32 numMediumTypes = cfg.getTargetPrinterNumberOfMediumTypes(cfgname);
stack.clear();
@@ -845,7 +796,7 @@ index 5a5173c155..ba311b258e 100644
{
mediumType = *((DcmCodeString *)(stack.top()));
OFString theMedium;
-@@ -555,7 +555,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -555,7 +555,7 @@
{
Uint32 numFilmDestination = cfg.getTargetPrinterNumberOfFilmDestinations(cfgname);
stack.clear();
@@ -854,7 +805,7 @@ index 5a5173c155..ba311b258e 100644
{
filmDestination = *((DcmCodeString *)(stack.top()));
OFString theDestination;
-@@ -586,7 +586,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -586,7 +586,7 @@
if (result)
{
stack.clear();
@@ -863,7 +814,7 @@ index 5a5173c155..ba311b258e 100644
{
filmSessionLabel = *((DcmLongString *)(stack.top()));
ADD_TO_PDATASET(DcmLongString, filmSessionLabel)
-@@ -597,7 +597,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -597,7 +597,7 @@
if (result)
{
stack.clear();
@@ -872,7 +823,7 @@ index 5a5173c155..ba311b258e 100644
{
ownerID = *((DcmShortString *)(stack.top()));
ADD_TO_PDATASET(DcmShortString, ownerID)
-@@ -611,7 +611,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -611,7 +611,7 @@
if (result)
{
stack.clear();
@@ -881,7 +832,7 @@ index 5a5173c155..ba311b258e 100644
{
illumination = *((DcmUnsignedShort *)(stack.top()));
// we don't check illumination set by the user (for now)
-@@ -623,7 +623,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -623,7 +623,7 @@
if (result)
{
stack.clear();
@@ -890,7 +841,7 @@ index 5a5173c155..ba311b258e 100644
{
reflectedAmbientLight = *((DcmUnsignedShort *)(stack.top()));
// we don't check reflected ambient light set by the user (for now)
-@@ -636,7 +636,7 @@ OFBool DVPSFilmSession::printSCPSet(
+@@ -636,7 +636,7 @@
{
stack.clear();
@@ -899,10 +850,8 @@ index 5a5173c155..ba311b258e 100644
{
DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-diff --git a/dcmpstat/libsrc/dvpsgal.cc b/dcmpstat/libsrc/dvpsgal.cc
-index 909deac9e2..89d893de83 100644
---- a/dcmpstat/libsrc/dvpsgal.cc
-+++ b/dcmpstat/libsrc/dvpsgal.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsgal.cc
++++ dcmtk/dcmpstat/libsrc/dvpsgal.cc
@@ -1,6 +1,6 @@
/*
*
@@ -911,7 +860,7 @@ index 909deac9e2..89d893de83 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -69,7 +69,7 @@ OFCondition DVPSGraphicAnnotation_PList::read(DcmItem &dset)
+@@ -69,7 +69,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -920,10 +869,8 @@ index 909deac9e2..89d893de83 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsgll.cc b/dcmpstat/libsrc/dvpsgll.cc
-index d82d208628..fbf5d97d72 100644
---- a/dcmpstat/libsrc/dvpsgll.cc
-+++ b/dcmpstat/libsrc/dvpsgll.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsgll.cc
++++ dcmtk/dcmpstat/libsrc/dvpsgll.cc
@@ -1,6 +1,6 @@
/*
*
@@ -932,7 +879,7 @@ index d82d208628..fbf5d97d72 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -75,7 +75,7 @@ OFCondition DVPSGraphicLayer_PList::read(DcmItem &dset)
+@@ -75,7 +75,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -941,10 +888,8 @@ index d82d208628..fbf5d97d72 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsgrl.cc b/dcmpstat/libsrc/dvpsgrl.cc
-index 14d0e713f9..61dd6565c3 100644
---- a/dcmpstat/libsrc/dvpsgrl.cc
-+++ b/dcmpstat/libsrc/dvpsgrl.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsgrl.cc
++++ dcmtk/dcmpstat/libsrc/dvpsgrl.cc
@@ -1,6 +1,6 @@
/*
*
@@ -953,7 +898,7 @@ index 14d0e713f9..61dd6565c3 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -66,7 +66,7 @@ OFCondition DVPSGraphicObject_PList::read(DcmItem &dset)
+@@ -66,7 +66,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -962,11 +907,9 @@ index 14d0e713f9..61dd6565c3 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpshlp.cc b/dcmpstat/libsrc/dvpshlp.cc
-index 20b4429e45..fd1057a137 100644
---- a/dcmpstat/libsrc/dvpshlp.cc
-+++ b/dcmpstat/libsrc/dvpshlp.cc
-@@ -163,7 +163,7 @@ OFBool DVPSHelper::haveReferencedUIDItem(DcmSequenceOfItems& seq, const char *ui
+--- dcmtk.orig/dcmpstat/libsrc/dvpshlp.cc
++++ dcmtk/dcmpstat/libsrc/dvpshlp.cc
+@@ -178,7 +178,7 @@
{
item = seq.getItem(i);
stack.clear();
@@ -975,10 +918,8 @@ index 20b4429e45..fd1057a137 100644
{
aString.clear();
refuid = (DcmUniqueIdentifier *)(stack.top());
-diff --git a/dcmpstat/libsrc/dvpsib.cc b/dcmpstat/libsrc/dvpsib.cc
-index 096c5b3e19..57fee5763b 100644
---- a/dcmpstat/libsrc/dvpsib.cc
-+++ b/dcmpstat/libsrc/dvpsib.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsib.cc
++++ dcmtk/dcmpstat/libsrc/dvpsib.cc
@@ -1,6 +1,6 @@
/*
*
@@ -987,7 +928,7 @@ index 096c5b3e19..57fee5763b 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -153,7 +153,7 @@ OFCondition DVPSImageBoxContent::read(DcmItem &dset, DVPSPresentationLUT_PList&
+@@ -153,7 +153,7 @@
if (result==EC_Normal)
{
stack.clear();
@@ -996,7 +937,7 @@ index 096c5b3e19..57fee5763b 100644
{
seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -181,7 +181,7 @@ OFCondition DVPSImageBoxContent::read(DcmItem &dset, DVPSPresentationLUT_PList&
+@@ -181,7 +181,7 @@
// check referenced presentation LUT sequence
// if there is any reference, it must refer to one of the presentation LUTs we are managing.
stack.clear();
@@ -1005,7 +946,7 @@ index 096c5b3e19..57fee5763b 100644
{
seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -672,7 +672,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -672,7 +672,7 @@
if (result)
{
stack.clear();
@@ -1014,7 +955,7 @@ index 096c5b3e19..57fee5763b 100644
{
imageBoxPosition = *((DcmUnsignedShort *)(stack.top()));
// the image box position is checked elsewhere
-@@ -688,7 +688,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -688,7 +688,7 @@
if (result)
{
stack.clear();
@@ -1023,7 +964,7 @@ index 096c5b3e19..57fee5763b 100644
{
magnificationType = *((DcmCodeString *)(stack.top()));
Uint32 numMagnifications = cfg.getTargetPrinterNumberOfMagnificationTypes(cfgname);
-@@ -721,7 +721,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -721,7 +721,7 @@
{
stack.clear();
@@ -1032,7 +973,7 @@ index 096c5b3e19..57fee5763b 100644
{
smoothingType = *((DcmCodeString *)(stack.top()));
Uint32 numSmoothings = cfg.getTargetPrinterNumberOfSmoothingTypes(cfgname);
-@@ -761,7 +761,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -761,7 +761,7 @@
if (result)
{
stack.clear();
@@ -1041,7 +982,7 @@ index 096c5b3e19..57fee5763b 100644
{
configurationInformation = *((DcmShortText *)(stack.top()));
Uint32 numConfigurationInformation = cfg.getTargetPrinterNumberOfConfigurationSettings(cfgname);
-@@ -800,7 +800,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -800,7 +800,7 @@
if (result)
{
stack.clear();
@@ -1050,7 +991,7 @@ index 096c5b3e19..57fee5763b 100644
{
polarity = *((DcmCodeString *)(stack.top()));
OFString thePolarity;
-@@ -820,7 +820,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -820,7 +820,7 @@
if (result)
{
stack.clear();
@@ -1059,7 +1000,7 @@ index 096c5b3e19..57fee5763b 100644
{
if (! cfg.getTargetPrinterSupportsRequestedImageSize(cfgname))
{
-@@ -841,7 +841,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -841,7 +841,7 @@
if (result)
{
stack.clear();
@@ -1068,7 +1009,7 @@ index 096c5b3e19..57fee5763b 100644
{
if (! cfg.getTargetPrinterSupportsDecimateCrop(cfgname))
{
-@@ -871,7 +871,7 @@ OFBool DVPSImageBoxContent::printSCPSet(
+@@ -871,7 +871,7 @@
if (result)
{
stack.clear();
@@ -1077,7 +1018,7 @@ index 096c5b3e19..57fee5763b 100644
{
DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -971,7 +971,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -971,7 +971,7 @@
if (result)
{
stack.clear();
@@ -1086,7 +1027,7 @@ index 096c5b3e19..57fee5763b 100644
{
samplesPerPixel = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -994,7 +994,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -994,7 +994,7 @@
if (result)
{
stack.clear();
@@ -1095,7 +1036,7 @@ index 096c5b3e19..57fee5763b 100644
{
rows = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1017,7 +1017,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1017,7 +1017,7 @@
if (result)
{
stack.clear();
@@ -1104,7 +1045,7 @@ index 096c5b3e19..57fee5763b 100644
{
columns = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1042,7 +1042,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1042,7 +1042,7 @@
if (result)
{
stack.clear();
@@ -1113,7 +1054,7 @@ index 096c5b3e19..57fee5763b 100644
{
bitsStored = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1082,7 +1082,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1082,7 +1082,7 @@
if (result)
{
stack.clear();
@@ -1122,7 +1063,7 @@ index 096c5b3e19..57fee5763b 100644
{
bitsAllocated = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1105,7 +1105,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1105,7 +1105,7 @@
if (result)
{
stack.clear();
@@ -1131,7 +1072,7 @@ index 096c5b3e19..57fee5763b 100644
{
highBit = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1128,7 +1128,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1128,7 +1128,7 @@
if (result)
{
stack.clear();
@@ -1140,7 +1081,7 @@ index 096c5b3e19..57fee5763b 100644
{
pixelRepresentation = *((DcmUnsignedShort *)(stack.top()));
val = 0;
-@@ -1151,7 +1151,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1151,7 +1151,7 @@
if (result)
{
stack.clear();
@@ -1149,7 +1090,7 @@ index 096c5b3e19..57fee5763b 100644
{
photometricInterpretation = *((DcmCodeString *)(stack.top()));
OFString theColorModel;
-@@ -1175,7 +1175,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1175,7 +1175,7 @@
if (result)
{
stack.clear();
@@ -1158,7 +1099,7 @@ index 096c5b3e19..57fee5763b 100644
{
pixelAspectRatio = *((DcmIntegerString *)(stack.top()));
if (pixelAspectRatio.getVM() != 2)
-@@ -1193,7 +1193,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence(
+@@ -1193,7 +1193,7 @@
if (result)
{
stack.clear();
@@ -1167,10 +1108,8 @@ index 096c5b3e19..57fee5763b 100644
{
pixelData = new DcmPixelData(DCM_PixelData);
if (pixelData)
-diff --git a/dcmpstat/libsrc/dvpsibl.cc b/dcmpstat/libsrc/dvpsibl.cc
-index e3768d5a0d..ef069eb845 100644
---- a/dcmpstat/libsrc/dvpsibl.cc
-+++ b/dcmpstat/libsrc/dvpsibl.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsibl.cc
++++ dcmtk/dcmpstat/libsrc/dvpsibl.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1179,7 +1118,7 @@ index e3768d5a0d..ef069eb845 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -68,7 +68,7 @@ OFCondition DVPSImageBoxContent_PList::read(DcmItem &dset, DVPSPresentationLUT_P
+@@ -68,7 +68,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1188,10 +1127,8 @@ index e3768d5a0d..ef069eb845 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpspll.cc b/dcmpstat/libsrc/dvpspll.cc
-index 1b2b7a35bb..46465171c7 100644
---- a/dcmpstat/libsrc/dvpspll.cc
-+++ b/dcmpstat/libsrc/dvpspll.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpspll.cc
++++ dcmtk/dcmpstat/libsrc/dvpspll.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1200,7 +1137,7 @@ index 1b2b7a35bb..46465171c7 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -72,7 +72,7 @@ OFCondition DVPSPresentationLUT_PList::read(DcmItem &dset)
+@@ -72,7 +72,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1209,10 +1146,8 @@ index 1b2b7a35bb..46465171c7 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsril.cc b/dcmpstat/libsrc/dvpsril.cc
-index 793e69063a..9dee1f6bfd 100644
---- a/dcmpstat/libsrc/dvpsril.cc
-+++ b/dcmpstat/libsrc/dvpsril.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsril.cc
++++ dcmtk/dcmpstat/libsrc/dvpsril.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1221,7 +1156,7 @@ index 793e69063a..9dee1f6bfd 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -71,7 +71,7 @@ OFCondition DVPSReferencedImage_PList::read(DcmItem &dset)
+@@ -71,7 +71,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1230,10 +1165,8 @@ index 793e69063a..9dee1f6bfd 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsrsl.cc b/dcmpstat/libsrc/dvpsrsl.cc
-index 4b0c83aa75..d2f9dcfffd 100644
---- a/dcmpstat/libsrc/dvpsrsl.cc
-+++ b/dcmpstat/libsrc/dvpsrsl.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsrsl.cc
++++ dcmtk/dcmpstat/libsrc/dvpsrsl.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1242,7 +1175,7 @@ index 4b0c83aa75..d2f9dcfffd 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -69,7 +69,7 @@ OFCondition DVPSReferencedSeries_PList::read(DcmItem &dset)
+@@ -69,7 +69,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1251,10 +1184,8 @@ index 4b0c83aa75..d2f9dcfffd 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpssp.cc b/dcmpstat/libsrc/dvpssp.cc
-index 98b1201a7f..717c814607 100644
---- a/dcmpstat/libsrc/dvpssp.cc
-+++ b/dcmpstat/libsrc/dvpssp.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpssp.cc
++++ dcmtk/dcmpstat/libsrc/dvpssp.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1263,7 +1194,7 @@ index 98b1201a7f..717c814607 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -328,7 +328,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset)
+@@ -328,7 +328,7 @@
if (result==EC_Normal)
{
stack.clear();
@@ -1272,7 +1203,7 @@ index 98b1201a7f..717c814607 100644
{
seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -362,7 +362,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset)
+@@ -362,7 +362,7 @@
// check referenced presentation LUT sequence
// if there is any reference, it must refer to one of the presentation LUTs we are managing.
stack.clear();
@@ -1281,7 +1212,7 @@ index 98b1201a7f..717c814607 100644
{
seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -445,7 +445,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset)
+@@ -445,7 +445,7 @@
if (result==EC_Normal)
{
stack.clear();
@@ -1290,7 +1221,7 @@ index 98b1201a7f..717c814607 100644
{
OFBool haveFilmBox = OFFalse;
OFBool haveGrayscaleImageBox = OFFalse;
-@@ -511,7 +511,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset)
+@@ -511,7 +511,7 @@
destination.clear();
printerName.clear();
stack.clear();
@@ -1299,7 +1230,7 @@ index 98b1201a7f..717c814607 100644
{
seq = (DcmSequenceOfItems *)stack.top();
if (seq->card() > 0)
-@@ -1536,7 +1536,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler&
+@@ -1536,7 +1536,7 @@
{
// N-CREATE was successful, now evaluate Referenced Image Box SQ
stack.clear();
@@ -1308,7 +1239,7 @@ index 98b1201a7f..717c814607 100644
{
seq=(DcmSequenceOfItems *)stack.top();
numItems = (size_t)seq->card();
-@@ -1559,7 +1559,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler&
+@@ -1559,7 +1559,7 @@
// evaluate Referenced Basic Annotation Box SQ if present
stack.clear();
annotationContentList.clearAnnotationSOPInstanceUIDs();
@@ -1317,7 +1248,7 @@ index 98b1201a7f..717c814607 100644
{
seq=(DcmSequenceOfItems *)stack.top();
numItems = (size_t)seq->card();
-@@ -2419,7 +2419,7 @@ OFBool DVPSStoredPrint::printSCPCreate(
+@@ -2419,7 +2419,7 @@
{
stack.clear();
@@ -1326,7 +1257,7 @@ index 98b1201a7f..717c814607 100644
{
DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-@@ -2487,7 +2487,7 @@ OFBool DVPSStoredPrint::printSCPCreate(
+@@ -2487,7 +2487,7 @@
{
stack.clear();
@@ -1335,7 +1266,7 @@ index 98b1201a7f..717c814607 100644
{
DcmUniqueIdentifier classUID(DCM_ReferencedSOPClassUID);
DcmUniqueIdentifier instanceUID(DCM_ReferencedSOPInstanceUID);
-@@ -2706,7 +2706,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2706,7 +2706,7 @@
if (result)
{
stack.clear();
@@ -1344,7 +1275,7 @@ index 98b1201a7f..717c814607 100644
{
magnificationType = *((DcmCodeString *)(stack.top()));
Uint32 numMagnifications = cfg.getTargetPrinterNumberOfMagnificationTypes(cfgname);
-@@ -2739,7 +2739,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2739,7 +2739,7 @@
{
stack.clear();
@@ -1353,7 +1284,7 @@ index 98b1201a7f..717c814607 100644
{
smoothingType = *((DcmCodeString *)(stack.top()));
Uint32 numSmoothings = cfg.getTargetPrinterNumberOfSmoothingTypes(cfgname);
-@@ -2781,7 +2781,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2781,7 +2781,7 @@
{
stack.clear();
@@ -1362,7 +1293,7 @@ index 98b1201a7f..717c814607 100644
{
borderDensity = *((DcmCodeString *)(stack.top()));
Uint32 numBorderDensities = cfg.getTargetPrinterNumberOfBorderDensities(cfgname);
-@@ -2832,7 +2832,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2832,7 +2832,7 @@
if (result)
{
stack.clear();
@@ -1371,7 +1302,7 @@ index 98b1201a7f..717c814607 100644
{
emptyImageDensity = *((DcmCodeString *)(stack.top()));
Uint32 numEmptyImageDensities = cfg.getTargetPrinterNumberOfEmptyImageDensities(cfgname);
-@@ -2883,7 +2883,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2883,7 +2883,7 @@
if (result)
{
stack.clear();
@@ -1380,7 +1311,7 @@ index 98b1201a7f..717c814607 100644
{
maxDensity = *((DcmUnsignedShort *)(stack.top()));
// we don't check a max density set by the user (for now)
-@@ -2895,7 +2895,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2895,7 +2895,7 @@
if (result)
{
stack.clear();
@@ -1389,7 +1320,7 @@ index 98b1201a7f..717c814607 100644
{
minDensity = *((DcmUnsignedShort *)(stack.top()));
Uint32 numMinDensities = cfg.getTargetPrinterNumberOfMinDensities(cfgname);
-@@ -2917,7 +2917,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2917,7 +2917,7 @@
if (result)
{
stack.clear();
@@ -1398,7 +1329,7 @@ index 98b1201a7f..717c814607 100644
{
trim = *((DcmCodeString *)(stack.top()));
-@@ -2945,7 +2945,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2945,7 +2945,7 @@
if (result)
{
stack.clear();
@@ -1407,7 +1338,7 @@ index 98b1201a7f..717c814607 100644
{
configurationInformation = *((DcmShortText *)(stack.top()));
Uint32 numConfigurationInformation = cfg.getTargetPrinterNumberOfConfigurationSettings(cfgname);
-@@ -2987,7 +2987,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2987,7 +2987,7 @@
if (result)
{
stack.clear();
@@ -1416,7 +1347,7 @@ index 98b1201a7f..717c814607 100644
{
illumination = *((DcmUnsignedShort *)(stack.top()));
// we don't check illumination set by the user (for now)
-@@ -2999,7 +2999,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -2999,7 +2999,7 @@
if (result)
{
stack.clear();
@@ -1425,7 +1356,7 @@ index 98b1201a7f..717c814607 100644
{
reflectedAmbientLight = *((DcmUnsignedShort *)(stack.top()));
// we don't check reflected ambient light set by the user (for now)
-@@ -3012,7 +3012,7 @@ OFBool DVPSStoredPrint::printSCPSet(
+@@ -3012,7 +3012,7 @@
{
stack.clear();
@@ -1434,10 +1365,8 @@ index 98b1201a7f..717c814607 100644
{
DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top();
if (seq->card() ==1)
-diff --git a/dcmpstat/libsrc/dvpstxl.cc b/dcmpstat/libsrc/dvpstxl.cc
-index ffb6dcc10e..8e35ff7ae6 100644
---- a/dcmpstat/libsrc/dvpstxl.cc
-+++ b/dcmpstat/libsrc/dvpstxl.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpstxl.cc
++++ dcmtk/dcmpstat/libsrc/dvpstxl.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1446,7 +1375,7 @@ index ffb6dcc10e..8e35ff7ae6 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -66,7 +66,7 @@ OFCondition DVPSTextObject_PList::read(DcmItem &dset)
+@@ -66,7 +66,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1455,10 +1384,8 @@ index ffb6dcc10e..8e35ff7ae6 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmpstat/libsrc/dvpsvll.cc b/dcmpstat/libsrc/dvpsvll.cc
-index 3859f4ab96..17a6277071 100644
---- a/dcmpstat/libsrc/dvpsvll.cc
-+++ b/dcmpstat/libsrc/dvpsvll.cc
+--- dcmtk.orig/dcmpstat/libsrc/dvpsvll.cc
++++ dcmtk/dcmpstat/libsrc/dvpsvll.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1467,7 +1394,7 @@ index 3859f4ab96..17a6277071 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -66,7 +66,7 @@ OFCondition DVPSVOILUT_PList::read(DcmItem &dset)
+@@ -66,7 +66,7 @@
DcmSequenceOfItems *dseq=NULL;
DcmItem *ditem=NULL;
@@ -1476,10 +1403,8 @@ index 3859f4ab96..17a6277071 100644
{
dseq=(DcmSequenceOfItems *)stack.top();
if (dseq)
-diff --git a/dcmrt/libsrc/drttypes.cc b/dcmrt/libsrc/drttypes.cc
-index 3aee4312f2..77ff1674c6 100644
---- a/dcmrt/libsrc/drttypes.cc
-+++ b/dcmrt/libsrc/drttypes.cc
+--- dcmtk.orig/dcmrt/libsrc/drttypes.cc
++++ dcmtk/dcmrt/libsrc/drttypes.cc
@@ -1,14 +1,12 @@
/*
*
@@ -1497,7 +1422,7 @@ index 3aee4312f2..77ff1674c6 100644
*
*/
-@@ -212,7 +210,7 @@ OFCondition DRTTypes::getAndCheckStringValueFromDataset(DcmItem &dataset,
+@@ -212,7 +210,7 @@
{
DcmStack stack;
OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -1506,10 +1431,8 @@ index 3aee4312f2..77ff1674c6 100644
{
DcmElement *element = OFstatic_cast(DcmElement *, stack.top());
if (element != NULL)
-diff --git a/dcmsign/libsrc/dcsignat.cc b/dcmsign/libsrc/dcsignat.cc
-index b104ec1e81..c5b57099a4 100644
---- a/dcmsign/libsrc/dcsignat.cc
-+++ b/dcmsign/libsrc/dcsignat.cc
+--- dcmtk.orig/dcmsign/libsrc/dcsignat.cc
++++ dcmtk/dcmsign/libsrc/dcsignat.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1518,7 +1441,7 @@ index b104ec1e81..c5b57099a4 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -104,7 +104,7 @@ OFCondition DcmSignature::getMACIDnumber(DcmItem &item, Uint16& macid)
+@@ -104,7 +104,7 @@
macid = 0xFFFF;
DcmStack stack;
OFCondition result = item.search(DCM_MACIDNumber, stack, ESM_fromHere, OFFalse);
@@ -1527,7 +1450,7 @@ index b104ec1e81..c5b57099a4 100644
{
result = ((DcmElement *)(stack.top()))->getUint16(macid);
}
-@@ -734,7 +734,7 @@ OFCondition DcmSignature::verifyCurrent()
+@@ -734,7 +734,7 @@
// read MAC Calculation Transfer Syntax UID
if (result.good())
{
@@ -1536,7 +1459,7 @@ index b104ec1e81..c5b57099a4 100644
{
char *uid = NULL;
if ((((DcmElement *)(stack.top()))->getString(uid)).good())
-@@ -750,7 +750,7 @@ OFCondition DcmSignature::verifyCurrent()
+@@ -750,7 +750,7 @@
if (result.good())
{
stack.clear();
@@ -1545,7 +1468,7 @@ index b104ec1e81..c5b57099a4 100644
{
OFString macidentifier;
if ((((DcmElement *)(stack.top()))->getOFString(macidentifier, 0)).good())
-@@ -783,7 +783,7 @@ OFCondition DcmSignature::verifyCurrent()
+@@ -783,7 +783,7 @@
if (result.good())
{
stack.clear();
@@ -1554,7 +1477,7 @@ index b104ec1e81..c5b57099a4 100644
{
signature = new DcmOtherByteOtherWord(*((DcmOtherByteOtherWord *)(stack.top())));
if (signature == NULL) result = EC_MemoryExhausted;
-@@ -960,7 +960,7 @@ OFCondition DcmSignature::getCurrentMacXferSyntaxName(OFString& str)
+@@ -960,7 +960,7 @@
DcmStack stack;
// read MAC Calculation Transfer Syntax UID
@@ -1563,7 +1486,7 @@ index b104ec1e81..c5b57099a4 100644
{
char *uid = NULL;
if ((((DcmElement *)(stack.top()))->getString(uid)).good() && uid)
-@@ -1005,7 +1005,7 @@ OFCondition DcmSignature::getCurrentMacName(OFString& str)
+@@ -1005,7 +1005,7 @@
DcmStack stack;
// read MAC Algorithm
@@ -1572,7 +1495,7 @@ index b104ec1e81..c5b57099a4 100644
{
if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal;
}
-@@ -1020,7 +1020,7 @@ OFCondition DcmSignature::getCurrentSignatureUID(OFString& str)
+@@ -1020,7 +1020,7 @@
DcmStack stack;
// read signature UID
@@ -1581,7 +1504,7 @@ index b104ec1e81..c5b57099a4 100644
{
if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal;
}
-@@ -1048,7 +1048,7 @@ OFCondition DcmSignature::getCurrentSignatureDateTime(OFString& str)
+@@ -1048,7 +1048,7 @@
DcmStack stack;
// read signature date/time
@@ -1590,7 +1513,7 @@ index b104ec1e81..c5b57099a4 100644
{
if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal;
}
-@@ -1119,7 +1119,7 @@ OFCondition DcmSignature::verifySignatureProfile(SiSecurityProfile &sprof)
+@@ -1119,7 +1119,7 @@
// check MAC Calculation Transfer Syntax UID
if (result.good())
{
@@ -1599,7 +1522,7 @@ index b104ec1e81..c5b57099a4 100644
{
char *uid = NULL;
if ((((DcmElement *)(stack.top()))->getString(uid)).good())
-@@ -1142,7 +1142,7 @@ OFCondition DcmSignature::verifySignatureProfile(SiSecurityProfile &sprof)
+@@ -1142,7 +1142,7 @@
{
E_MACType mac = EMT_RIPEMD160;
stack.clear();
@@ -1608,11 +1531,9 @@ index b104ec1e81..c5b57099a4 100644
{
OFString macidentifier;
if ((((DcmElement *)(stack.top()))->getOFString(macidentifier, 0)).good())
-diff --git a/dcmsign/libsrc/sicert.cc b/dcmsign/libsrc/sicert.cc
-index 173bbbf2c3..0668b72c99 100644
---- a/dcmsign/libsrc/sicert.cc
-+++ b/dcmsign/libsrc/sicert.cc
-@@ -135,7 +135,7 @@ OFCondition SiCertificate::read(DcmItem& item)
+--- dcmtk.orig/dcmsign/libsrc/sicert.cc
++++ dcmtk/dcmsign/libsrc/sicert.cc
+@@ -147,7 +147,7 @@
OFString aString;
DcmStack stack;
result = item.search(DCM_CertificateType, stack, ESM_fromHere, OFFalse);
@@ -1621,7 +1542,7 @@ index 173bbbf2c3..0668b72c99 100644
{
result = ((DcmElement *)(stack.top()))->getOFString(aString, 0);
if (result.good())
-@@ -144,7 +144,7 @@ OFCondition SiCertificate::read(DcmItem& item)
+@@ -156,7 +156,7 @@
{
stack.clear();
result = item.search(DCM_CertificateOfSigner, stack, ESM_fromHere, OFFalse);
@@ -1630,10 +1551,8 @@ index 173bbbf2c3..0668b72c99 100644
{
DcmElement *cert = (DcmElement *)stack.top();
Uint8 *data = NULL;
-diff --git a/dcmsr/libsrc/dsrtypes.cc b/dcmsr/libsrc/dsrtypes.cc
-index 08414ad93e..a9d6218594 100644
---- a/dcmsr/libsrc/dsrtypes.cc
-+++ b/dcmsr/libsrc/dsrtypes.cc
+--- dcmtk.orig/dcmsr/libsrc/dsrtypes.cc
++++ dcmtk/dcmsr/libsrc/dsrtypes.cc
@@ -1,6 +1,6 @@
/*
*
@@ -1642,7 +1561,7 @@ index 08414ad93e..a9d6218594 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -1178,7 +1178,7 @@ OFCondition DSRTypes::getAndCheckElementFromDataset(DcmItem &dataset,
+@@ -1178,7 +1178,7 @@
DcmStack stack;
const DcmTagKey tagKey = delem.getTag();
OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
@@ -1651,7 +1570,7 @@ index 08414ad93e..a9d6218594 100644
{
/* copy object from search stack */
result = delem.copyFrom(*stack.top());
-@@ -1203,7 +1203,7 @@ OFCondition DSRTypes::getAndCheckStringValueFromDataset(DcmItem &dataset,
+@@ -1203,7 +1203,7 @@
{
DcmStack stack;
OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);
=====================================
debian/patches/0004-Fixed-two-segmentation-faults.patch
=====================================
@@ -15,10 +15,8 @@ This closes DCMTK issue #1114.
dcmnet/libsrc/dimcmd.cc | 33 ++++++++++++++++++---------------
2 files changed, 26 insertions(+), 16 deletions(-)
-diff --git a/dcmdata/libsrc/dcelem.cc b/dcmdata/libsrc/dcelem.cc
-index 1524904be..3b9cc2bf7 100644
---- a/dcmdata/libsrc/dcelem.cc
-+++ b/dcmdata/libsrc/dcelem.cc
+--- dcmtk.orig/dcmdata/libsrc/dcelem.cc
++++ dcmtk/dcmdata/libsrc/dcelem.cc
@@ -1,6 +1,6 @@
/*
*
@@ -27,7 +25,7 @@ index 1524904be..3b9cc2bf7 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
-@@ -717,6 +717,13 @@ OFCondition DcmElement::loadValue(DcmInputStream *inStream)
+@@ -717,6 +717,13 @@
if (isStreamNew)
delete readStream;
}
@@ -41,10 +39,8 @@ index 1524904be..3b9cc2bf7 100644
}
/* return result value */
return errorFlag;
-diff --git a/dcmnet/libsrc/dimcmd.cc b/dcmnet/libsrc/dimcmd.cc
-index 6dca39546..ffd225f4b 100644
---- a/dcmnet/libsrc/dimcmd.cc
-+++ b/dcmnet/libsrc/dimcmd.cc
+--- dcmtk.orig/dcmnet/libsrc/dimcmd.cc
++++ dcmtk/dcmnet/libsrc/dimcmd.cc
@@ -1,6 +1,6 @@
/*
*
@@ -53,7 +49,7 @@ index 6dca39546..ffd225f4b 100644
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were partly developed by
-@@ -205,22 +205,25 @@ getString(DcmDataset *obj, DcmTagKey t, char *s, int maxlen, OFBool *spacePadded
+@@ -207,22 +207,25 @@
return parseErrorWithMsg("dimcmd:getString: string too small", t);
} else {
ec = elem->getString(aString);
=====================================
debian/patches/0007-CVE-2024-47796.patch
=====================================
@@ -0,0 +1,32 @@
+Author: Joerg Riesmeier <dicom at jriesmeier.com>
+Forwarded: https://git.dcmtk.org/?p=dcmtk.git;a=commit;h=89a6e399f1e17d08a8bc8cdaa05b2ac9a50cd4f6
+Bug-Debian: https://bugs.debian.org/1093043
+Reviewed-By: Étienne Mollier <emollier at debian.org>
+Last-Update: 2025-01-18
+Description: Fixed issue rendering invalid monochrome image.
+ Fixed issue when rendering an invalid monochrome DICOM image where the
+ number of pixels stored does not match the expected number of pixels.
+ If the stored number is less than the expected number, the rest of the
+ pixel matrix for the intermediate representation was always filled with
+ the value 0. Under certain, very rare conditions, this could result in
+ memory problems reported by an Address Sanitizer (ASAN). Now, the rest
+ of the matrix is filled with the smallest possible value for the image.
+ .
+ Thanks to Emmanuel Tacheau from the Cisco Talos team
+ <vulndiscovery at external.cisco.com> for the original report, the sample
+ file (PoC) and further details. See TALOS-2024-2122 and CVE-2024-47796.
+
+--- dcmtk.orig/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h
++++ dcmtk/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h
+@@ -72,9 +72,9 @@
+ rescale(pixel); // "copy" or reference pixel data
+ this->determineMinMax(OFstatic_cast(T3, this->Modality->getMinValue()), OFstatic_cast(T3, this->Modality->getMaxValue()));
+ }
+- /* erase empty part of the buffer (= blacken the background) */
++ /* erase empty part of the buffer (= fill the background with the smallest possible value) */
+ if ((this->Data != NULL) && (this->InputCount < this->Count))
+- OFBitmanipTemplate<T3>::zeroMem(this->Data + this->InputCount, this->Count - this->InputCount);
++ OFBitmanipTemplate<T3>::setMem(this->Data + this->InputCount, OFstatic_cast(T3, this->Modality->getAbsMinimum()), this->Count - this->InputCount);
+ }
+ }
+
=====================================
debian/patches/0008-CVE-2024-52333.patch
=====================================
@@ -0,0 +1,48 @@
+Author: Joerg Riesmeier <dicom at jriesmeier.com>
+Forwarded: https://git.dcmtk.org/?p=dcmtk.git;a=commit;h=03e851b0586d05057c3268988e180ffb426b2e03
+Bug-Debian: https://bugs.debian.org/1093047
+Reviewed-By: Étienne Mollier <emollier at debian.org>
+Last-Update: 2025-01-18
+Description: Added check to make sure: HighBit < BitsAllocated.
+ Added check to the image preprocessing to make sure that the value of
+ HighBit is always less than the value of BitsAllocated. Before, this
+ missing check could lead to memory corruption if an invalid combination
+ of values was retrieved from a malformed DICOM dataset.
+ .
+ Thanks to Emmanuel Tacheau from the Cisco Talos team
+ <vulndiscovery at external.cisco.com> for the report, sample file (PoC)
+ and detailed analysis. See TALOS-2024-2121 and CVE-2024-52333.
+
+--- dcmtk.orig/dcmimgle/libsrc/diimage.cc
++++ dcmtk/dcmimgle/libsrc/diimage.cc
+@@ -1,6 +1,6 @@
+ /*
+ *
+- * Copyright (C) 1996-2021, OFFIS e.V.
++ * Copyright (C) 1996-2025, OFFIS e.V.
+ * All rights reserved. See COPYRIGHT file for details.
+ *
+ * This software and supporting documentation were developed by
+@@ -548,12 +548,18 @@
+ {
+ const unsigned long fsize = OFstatic_cast(unsigned long, Rows) * OFstatic_cast(unsigned long, Columns) *
+ OFstatic_cast(unsigned long, SamplesPerPixel);
+- if ((BitsAllocated < 1) || (BitsStored < 1) || (BitsAllocated < BitsStored) ||
+- (BitsStored > OFstatic_cast(Uint16, HighBit + 1)))
++ if ((BitsAllocated < 1) || (BitsStored < 1))
+ {
+ ImageStatus = EIS_InvalidValue;
+- DCMIMGLE_ERROR("invalid values for 'BitsAllocated' (" << BitsAllocated << "), "
+- << "'BitsStored' (" << BitsStored << ") and/or 'HighBit' (" << HighBit << ")");
++ DCMIMGLE_ERROR("invalid value(s) for 'BitsAllocated' (" << BitsAllocated << "), "
++ << "and/or 'BitsStored' (" << BitsStored << ")");
++ return;
++ }
++ else if ((BitsAllocated < BitsStored) || (BitsAllocated <= HighBit) || ((BitsStored - 1) > HighBit))
++ {
++ ImageStatus = EIS_InvalidValue;
++ DCMIMGLE_ERROR("invalid combination of values for 'BitsAllocated' (" << BitsAllocated << "), "
++ << "'BitsStored' (" << BitsStored << ") and 'HighBit' (" << HighBit << ")");
+ return;
+ }
+ else if ((evr == EVR_OB) && (BitsStored <= 8))
=====================================
debian/patches/series
=====================================
@@ -17,3 +17,5 @@ da5370947226783ce3548bf1e5b7112fac70de46.patch
0004-Fixed-two-segmentation-faults.patch
0005-Fixed-DcmDecimalString-unit-tests.patch
0006-Fixed-possible-overflows-when-allocating-memory.patch
+0007-CVE-2024-47796.patch
+0008-CVE-2024-52333.patch
View it on GitLab: https://salsa.debian.org/med-team/dcmtk/-/compare/7e434a747dd4d4e155dcd77dcc051367e2e85e50...b96ce74818ff6ef6868eb28d970ab0770cc4edcf
--
View it on GitLab: https://salsa.debian.org/med-team/dcmtk/-/compare/7e434a747dd4d4e155dcd77dcc051367e2e85e50...b96ce74818ff6ef6868eb28d970ab0770cc4edcf
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/20250118/a535a8c3/attachment-0001.htm>
More information about the debian-med-commit
mailing list