Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dcmdata/libsrc/dcpixseq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ OFCondition DcmPixelSequence::makeSubObject(DcmObject *&subObject,
l_error = EC_InvalidTag;
break;

case EVR_UL: //newTag (0x0000, 0x0000) has VR:UL
if (newTag == DCM_GenericGroupLength)
l_error = EC_ItemEnd;
break;

default:
newObject = new DcmPixelItem(newTag, newLength);
l_error = EC_CorruptedData;
Expand Down
5 changes: 5 additions & 0 deletions dcmdata/libsrc/dcsequen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ OFCondition DcmSequenceOfItems::readSubItem(DcmInputStream &inStream,
<< DCM_ItemDelimitationItem << " by sequence delimiter "
<< DCM_SequenceDelimitationItem << " because it is expected here");
l_error = EC_SequEnd;
} else if (dcmReplaceWrongDelimitationItem.get() && (l_error == EC_CorruptedData)) {
DCMDATA_DEBUG("DcmSequenceOfItems::readSubItem() replacing null bytes "
<< DCM_GenericGroupLength << " by sequence delimiter "
<< DCM_SequenceDelimitationItem << " because it is expected here");
l_error = EC_SequEnd;
} else {
DCMDATA_DEBUG("DcmSequenceOfItems::readSubItem() cannot create Sub Item " << newTag);
// treat this incorrect encoding as an error
Expand Down