Suspicious code in kdegraphics-3.5.2

Carsten Pfeiffer carpdjih at mailbox.tu-berlin.de
Sat Apr 22 18:06:26 BST 2006


On Saturday 22 April 2006 01:36, Christoph Bartoschek wrote:

> - kuickshow/src/defaultswidget.cpp:270
>
> Why not &&?

Fixed.

> - kmrml/kmrml/lib/watcher_stub.cpp:50
>
> result is only initialized when line 42 is executed.

This is DCOP generated code. The return value is only valid when the status is 
set to "CallSucceeded" which happens only in line 43. A client must check the 
validity with DCOPStub.ok() before using the result.

> - kooka/kookaview.cpp:881
>
> If dirKfi  is NULL as indicated by line 864, then line 881 crashes.

Fixed.

> - kooka/scanpackager.cpp:1246
>
> If e is NULL as indicated by line 1244, then line 1246 crashes.

Should never happen, removed the condition-chec.

> - kooka/scanpackager.cpp:443
>
> If item is NULL as indicated by line 421, then line 429 crashes.

Should never happen, but fixed anyway.

> - kooka/scanpackager.cpp:255
>
> If kfi is NULL as indicated by line 220, then line 255 crashes.

Fixed.

> - kuickshow/src/kuickshow.cpp:839
>
> If steps == 0, then item is NULL here.

Never happens, but I added a guard.

> - kuickshow/src/defaultswidget.cpp:179
>
> If imFiltered is NULL as indicated by line 150, then line 179 crashes.

Never happens, removed the guard in line 150.

> - libkscan/img_canvas.cpp:588,593,598,603

Added fall-through comments.

> - kfile-plugins/jpeg/exif.cpp:352

No problem, but added a break.

> Lines where boolean expressions are used in non-boolean contexts:
>
> I suspect that at least the lines marked with !!! are bugs
> -----------------------------------------------------------------
>
> - kuickshow/src/kuickshow.cpp:522
> - kuickshow/src/kuickshow.cpp:521

No bugs there.

Thanks a bunch,
Carsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 447 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060422/4f2433fc/attachment.sig>


More information about the kde-core-devel mailing list