Some remarks to kdelibs revision 592772
bartoschek at gmx.de
Thu Oct 5 22:30:39 BST 2006
Compared to previous mails, I do not report fall throughs without a comment,
impossible cases and booleans used in non boolean context.
Not & here?
Really && here and not &?
If r is NULL as indicated by line 1158, then line 1171 crashes.
If line 98 is false then line 100 crashes.
If line 498 is false then line 501 crashes.
If curr becomes NULL as indicated by line 138, then line 143 crashes.
If the while loop in line 258 ends because listItem == NULL, then
line 289 crashes.
If rl becomes NULL as indicated by line 252 and m_needsMask is still true,
then line 260 crashes.
If current == parent == NULL then lines 2653 or 2656 might crash.
- khtml/css/css_ruleimpl.cpp:203 (similar)
Lines 913 and 914 indicate that docLoader could be NULL here.
- kate/part/katedocument.cpp:4629 ff
The variable n is used (n > 0) before it is set (checkIntValue).
abs is for integers. fabs or std::abs could be better here.
CSS_PROP_FONT_SIZE and CSS_PROP_OUTLINE_OFFSET do not check whether
primitiveValue is set.
Is it allowed to call realloc on memory got from xmalloc?
If KXYSelector does not ensure that maxX-minX != 0, this line crashes.
If d->data is NULL as indicated by line 647, then this line crashes.
More information about the kde-core-devel