Bug #388
closedDICOMDIR causing a crash in the destructor of DcmDicomDir
100%
Description
see http://forum.dcmtk.org/viewtopic.php?t=2942
The DICOMDIR-file seems to be coded wrongly. The following offset values occur both in OffsetOfTheNextDirectoryRecord as well as OffsetOfReferencedLowerLevelDirectoryEntity: 27540, 27972, 28404, 29130, 29424. From there the corresponding records may have been deleted twice in the destructor. Obviously this should already be detected and reported as an error during reading.
In general the robustness/error tolerance of DICOMDIR code (performance as well, see todo list) needs to be improved. Perhaps the readability too... :-)
siehe http://forum.dcmtk.org/viewtopic.php?t=2942
Die DICOMDIR-Datei scheint fehlerhaft kodiert zu sein. Die folgenden Offset-Werte kommen sowohl bei OffsetOfTheNextDirectoryRecord als auch bei OffsetOfReferencedLowerLevelDirectoryEntity vor: 27540, 27972, 28404, 29130, 29424. Daher werden vermutlich die entsprechenden Records im Destruktor doppelt gelöscht. Das sollte natürlich bereits beim Einlesen erkannt und als Fehler gemeldet werden.Ganz allgemein sollte die Robustheit/Fehlertoleranz des DICOMDIR-Codes (neben der Performance, siehe To-do-Liste) verbessert werden. Vielleicht auch die Übersichtlichkeit ... :-)
Files
Updated by Uli Schlachter over 12 years ago
- File ignore_duplicates.patch ignore_duplicates.patch added
The attached patch fixes the crash and some quick testing suggests that it doesn't break anything. However, this seems like something that might need unit tests and some more careful "by hand" testing. Also, this should likely be an error return instead of a log message.
Updated by Jörg Riesmeier over 12 years ago
- Category set to Library
Please don't output a tag like that (separate group and element number). There is an output operator for tag keys ...
Updated by Andrew Chiw over 12 years ago
- Subject changed from DICOMDIR that caused a crash in the destructor of DcmDicomDir to DICOMDIR causing a crash in the destructor of DcmDicomDir
Updated by Jörg Riesmeier over 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Fixed with commit 246cbe6.