Patch #507
closedDiverse Bugfixes von Per Inge Mathisen
90%
Description
The attached patch fixes various issues found by running latest version
of cppcheck over dcmtk git master. Note that I have not tested these
changes, apart from running them through you unit tests
Concerning the last change - it is apparently a very bad idea to throw
an exception from a destructor, and cppcheck considers it an error.
More fixes after running static analysis on your software.
ofstringoffbyone.diff - fixes a few off-by-one errors in your fallback
implementation of std::string. After skimming through that code, I think
I would recommend that you retire it and rely on working std::string
implementations instead.
misc.diff - various places where pointers could be dereferenced while
NULL
Files
Updated by Jörg Riesmeier over 12 years ago
- Category set to Library
- Target version set to 3.6.2
Updated by Jörg Riesmeier over 12 years ago
- Priority changed from Normal to High
Updated by Uli Schlachter over 12 years ago
- Status changed from New to Feedback
- Assignee deleted (
Uli Schlachter) - % Done changed from 0 to 90
ofstringoffbyone.diff: NAK, reserve(n) makes sure there is an array of size at least (n+1), so this already makes sure that there is space for the EOS mark (and AFAIR this is the behavior that the C++ standard requires).
misc.diff: I don't like the "else {" > "else if (last) {" change. This can never make a difference, because "last" and "handle_>findRequestList" are both set in the same line. If this ever happens (remember, it cannot happen), a crash is IMHO better than silently forgetting (and leaking) parts of the request and generating a wrong reply. No one wants to debug that.
The "throw exception from destructor"-problem is reported to log4cplus.
All the other changes are part of commit a5fdfd28ccd1f067676abd6cebb70cac911709b0.
Someone should write a "thank you" mail with the above comments and a link to the commit in gitweb to Per...
Updated by Uli Schlachter over 12 years ago
Half of the change to oflog was applied to log4cplus: https://sourceforge.net/p/log4cplus/bugs/162/
Updated by Michael Onken about 12 years ago
- Status changed from Feedback to Closed