Actions
Bug #718
closedOFStandard::atof() cannot handle NaN
Start date:
2017-02-06
Due date:
% Done:
0%
Estimated time:
Module:
ofstd
Operating System:
Compiler:
Description
Alexander Karaivanov writes: I'd like to report bug in OFStandard::atof(), the version when DISABLE_OFSTD_ATOF is not defined (the version that does not use sscanf()). The problem is that this version cannot handle conversion of the string NaN to a NaN floating point value. As result, DcmFloatingPointSingle::putString("NaN") and DcmFloatingPointDouble::putString("NaN") would not work and return EC_CorruptedData instead.
Comment: Before fixing this it should be clarified whether NaN values are actually permitted in DICOM FL/FD elements.
Updated by Marco Eichelberg over 8 years ago
- Assignee set to Marco Eichelberg
- Priority changed from Low to Normal
- Target version changed from 3.6.3 to 3.6.2
- Update: According to the following specification, atof() should support "NaN" and "NaN(..chars..)": http://en.cppreference.com/w/cpp/string/byte/atof
- Since DICOM FL and FD are defined based on IEEE 754, which does support NaN, so should atof() in DCMTK: https://en.wikipedia.org/wiki/IEEE_754-1985#NaN
Updated by Jan Schlamelcher over 8 years ago
- Assignee changed from Marco Eichelberg to Nikolas Goldhammer
Updated by Jan Schlamelcher over 8 years ago
Fixed in commits #048b15696b8 and #967a05d5906c
Actions