Project

General

Profile

Actions

Bug #987

closed

Reading DICOM files from stdin may lead to infinite loop on Windows

Added by Marco Eichelberg over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
Start date:
2021-05-01
Due date:
% Done:

100%

Estimated time:
2:00 h
Module:
dcmdata
Operating System:
Win32
Compiler:

Description

The recently introduced feature that allows DICOM files to be read from stdin causes DcmFileFormat::loadFile() to be stuck in an infinite loop in some cases.
This only affects Windows, not any of the Posix operating systems.
The reason is apparently that Windows by default operates stdin in text mode, and DCMTK fails to switch to binary mode before starting to read DICOM data from stdin.
The error can be reproduced by piping the attached sample file to dcmdump with dcmdump - < dset_xfer_deflated.dcm


Files

dset_xfer_deflated.dcm (459 Bytes) dset_xfer_deflated.dcm Marco Eichelberg, 2021-05-01 14:49
Actions

Also available in: Atom PDF