Bug #1074
closedInfinite loop in sendDcmDataset() when using deflated transfer syntax
100%
Description
The sendDcmDataset() function in the dcmnet module can get into an infinite loop when trying to send a dataset in Deflated transfer syntax.
This happens when the input buffer of the compressed stream filter has only 2, 4 or 6 bytes left, and DcmSequence::write() or DcmItem::write() return EC_StreamNotifyClient because the tag and length for the sequence or item tag do not fit into the buffer. In this case, DcmOutputStream::write() is never called, so the compression filter will never compress and clean the input buffer, the output buffer remains empty and repeated calls to DcmDataset::write() always return EC_StreamNotifyClient, causing an infinite loop.
The bug can be demonstrated by starting storescp with
storescp 11112 --prefer-deflated
and then running storescu with the attached sample file:
storescu --propose-deflated localhost 11112 EndlessLoopAnonymized.dcm
This issue probably affects all DCMTK releases that support network transmissions in Deflated transfer syntax, i.e. 3.5.2 to 3.6.7.
Files
Updated by Marco Eichelberg over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Estimated time set to 3:00 h
Closed by commit #3aafabe88.