Actions
Bug #1156
closedNeed to check return value of DcmList::append(), DcmList::prepend() and DcmList::insert() to avoid possible memory leaks
Status:
WontFix
Priority:
Normal
Assignee:
-
Category:
Library
Target version:
-
Start date:
2025-03-09
Due date:
% Done:
0%
Estimated time:
Module:
dcmdata
Operating System:
Compiler:
Description
The methods DcmList::append(), DcmList::prepend() and DcmList::insert() may return NULL if the passed object could not be appended, prepended or inserted into the list. In this case, the caller must delete the memory associated with the object.
Updated by Marco Eichelberg 15 days ago
- Status changed from New to WontFix
The calls to DcmList::append(), DcmList::prepend() and DcmList::insert() can only fail (and return NULL) when the number of entries in the list is equal to (size_t)-1, which is impossible because memory will be exhausted before this situation can ever occur. There is, therefore, no risk of memory leaks if the return value is ignored.
Updated by Jörg Riesmeier 14 days ago
In fact, the maximum value DCM_EndOfListIndex is defined with the type unsigned long, which may be smaller than size_t on some systems.
Actions