I'm writing some software to read DICOM files and I am not sure how to deal with tags that have an undefined length. The standard says that
"If the Value Field has an Explicit Length, then the Value Length Field shall contain a value equal to the length (in bytes) of the Value Field. Otherwise, the Value Field has an Undefined Length and a Sequence Delimitation Item marks the end of the Value Field. "
So to read a value with undefined length FFFFFFFF I would continue reading bytes until I hit a sequence delimitation item FFFEE0DD. What happens if the value contains a series of bytes that happen to be equal to a sequence delimitation item? How do I correctly locate the sequence delimitation item?