Some remarks to kdelibs revision 592772

Christoph Bartoschek bartoschek at gmx.de
Thu Oct 5 22:30:39 BST 2006


Hi,

Compared to previous mails, I do not report fall throughs without a comment, 
impossible cases and booleans used in non boolean context.

Christoph

- kdecore/kcrash.cpp:267

Not & here?

- kparts/partmanager.cpp:290

Really && here and not &?

- khtml/khtml_caret.cpp:1171

If r is NULL as indicated by line 1158, then line 1171 crashes.

- khtml/xml/xml_tokenizer.cpp:100

If line 98 is false then line 100 crashes.

- khtml/xml/xml_tokenizer.cpp:501

If line 498 is false then line 501 crashes.

- khtml/rendering/render_layer.cpp:143

If curr becomes NULL as indicated by line 138, then line 143 crashes.

- khtml/rendering/render_list.cpp:289

If the while loop in line 258 ends because listItem == NULL, then 
line 289 crashes.

- khtml/rendering/render_replaced.cpp:260

If rl becomes NULL as indicated by line 252 and m_needsMask is still true, 
then line 260 crashes.

- khtml/rendering/render_block.cpp:2653

If current == parent == NULL then lines 2653 or 2656 might crash.

- khtml/css/css_valueimpl.cpp:916
- 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).

- khtml/ecma/kjs_context2d.cpp:487

abs is for integers. fabs or std::abs could be better here.

- khtml/css/cssstyleselector.cpp:3100

CSS_PROP_FONT_SIZE and CSS_PROP_OUTLINE_OFFSET do not check whether 
primitiveValue is set.

- kdesu/kdesu_stub.c:164 

Is it allowed to call realloc on memory got from xmalloc?

- kdeui/widgets/kxyselector.cpp:95

If KXYSelector does not ensure that maxX-minX != 0, this line crashes.

- kdecore/ktimezones.cpp:653

If d->data is NULL as indicated by line 647, then this line crashes.




More information about the kde-core-devel mailing list