Bug #764
Updated by Jörg Riesmeier about 8 years ago
At various places in the DCMTK, sscanf() is used to convert character string into an integer value. The current approach...
<pre>
Uint32 value = 0;
#if SIZEOF_LONG == 8
if (sscanf(ptr, "%u", &value) == 1)
#else
if (sscanf(ptr, "%lu", &value) == 1)
#endif
</pre>
... is not 100% portable when the integer variable has a specific size (number of bits), e.g. Uint32 or Sint32. This first "showed up":https://buildd.debian.org/status/fetch.php?pkg=dcmtk&arch=i386&ver=3.6.1~20170228-1&stamp=1498004632&file=log on a 32-bit Linux (Debian) system.
Maybe, there should be something like OFStandard::sscanUint32() and OFStandard::sscanSint32(), i.e. global functions that provide this functionality.