Actions
Bug #951
openRefactor calcElementLength()
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Module:
Operating System:
Compiler:
Description
The current implementation of calcElementLength() is prone to integer overflow errors since the result is always returned as a 32 bit integer. It should be refactored to return size_t so that we can always finish the calculation correctly (since size_t is the type to allow access to all the available memory depending on the target platform, is should always be sufficient to calculate the length of an object in the executing machine's memory). Handling size limits (i.e. encoding the length as a 32 bit value when writing DICOM data) shall then be implemented at one single place in the code only (during write, not during length calculation).
Actions