Suspicious code in kdegraphics-3.5.2

Michael Pyne michael.pyne at kdemail.net
Sat Apr 22 07:26:56 BST 2006


On Friday 21 April 2006 19:36, Christoph Bartoschek wrote:
> - kamera/kioslave/kamera.cpp:949
> - kamera/kioslave/kamera.cpp:989
>
> Use delete [] here.

Fixed.

> - kiconedit/kicongrid.cpp:2141-2149
>
> use delete [] here.

Fixed.

> - kiconedit/kicongrid.cpp:2018
>
> There are a lot of out of bounds accesses here. For example when n ==
> 15, i == 14 and j == 0.

n seems to be clipped to 8. (n = 1, 2, 4, 8), so I'm not sure that this is 
actually a problem.

> - kghostview/kgvdocument.cpp:668
>
> The open files from and to are leaking here.

Fixed.

> - kpovmodeler/pmdockwidget.cpp:2474
>
> The loop breaks quite early.

I looked but I'm not sure what exactly they're trying to do so I left it 
alone.

> - kpovmodeler/pmpovrayparser.cpp:6977
> - kpovmodeler/pmpovrayparser.cpp:6980
> - kpovmodeler/pmpovrayparser.cpp:6983
>
> ',' is always true.

Fixed. (I think ;)

> - kpovmodeler/pmspheresweep.cpp:436
>
> i is not initialized here.

Fixed.

> - kpovmodeler/pmvariant.cpp:893
>
> success is not set if PMVariant::ThreeState is chosen in line 860 and
> line 868 is not executed.

Fixed.

> - kfile-plugins/gif/gif-info.c:483
>
> outfile is still open here and not closed. This is a file leak.

Fixed.

> - kfile-plugins/gif/gif-info.c:290
>
> If line 284 is false, then gct and gct_size are uninitialized here.

Fixed.

> - kmrml/kmrml/lib/kmrml_config.cpp
>
> Can one be sure that two same constant strings always have the same
> address?

Fixed.

I don't have time to forwardport the changes to /trunk as I've been up for 
about 20 hours. :)  If no one does it by the time I return I'll do it myself.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060422/416b5b46/attachment.sig>


More information about the kde-core-devel mailing list