Actions
Feature #591
openWarning on odd value length in case of 0xffffffff (undefined length)
Status:
New
Priority:
Normal
Assignee:
-
Category:
Library
Target version:
-
Start date:
2014-02-26
Due date:
% Done:
0%
Estimated time:
Module:
dcmdata
Operating System:
Compiler:
Description
From DcmItem::readTagAndLength():
/* if the value in length is odd, print an error message */ if ( (valueLength & 1) && (valueLength != DCM_UndefinedLength) ) { DCMDATA_WARN("DcmItem: Length of element " << newTag << " is odd"); }
This warning is not reported on e.g. UT values with a length of 0xffffffff even though it would be forbidden to use such a length in a dataset (since this value is reserved for "undefined length", which is not allowed for most VRs).
Also the following if-statement (from the same method) does not check for VRs where undefined length is allowed at all:
/* if desired, check if length is greater than length of surrounding item */ const Uint32 valueLengthItem = getLengthField(); if ((ident() == EVR_item /* e.g. meta info would have length 0 */) && (valueLengthItem != DCM_UndefinedLength /* this does not work in undefined length items */) && (valueLength != DCM_UndefinedLength) /* Also, do not check sequences with undefined length 0xFFFFFFFF */ )
Updated by Jörg Riesmeier over 11 years ago
- Category set to Library
- Target version set to 3.6.2
- Module set to dcmdata
Updated by Marco Eichelberg over 8 years ago
- Target version changed from 3.6.2 to 3.6.3
Updated by Jan Schlamelcher over 7 years ago
- Target version changed from 3.6.3 to 3.6.6
Actions