kdegraphics code cleanup patch

David Faure faure at kde.org
Sat Jan 8 02:44:15 GMT 2005

On Friday 31 December 2004 14:03, Steve G wrote:
> Hi,
> I have been going through various pieces of kde code. I am attaching a patch
> against kdegraphics that fixes or highlights problem areas. In some cases I don't
> know the best way to solve the problem, but pointing it out should allow the
> maintainers to do the right thing.
> kfile-plugins/jpeg/exif.cpp
> process_EXIF is called without verifying that itemlen >= 8. If you look at the
> called function, it accesses the 8th element in the data array. The same goes for
> the process_SOFn function. For both of these, I placed a FIXME tag since I don't
> know how you really want to handle it. The code does check for itemlen > 2, but
> that's not sufficient for these 2 cases.
> kfile-plugins/jpeg/kfile_setcomment.cpp has a couple of memory leaks.

Applied and mailed one of the authors about the exif.cpp problem (the person who
imported the code isn't even in kde-common/accounts anymore though).

> kpdf/kpdf/kpdf_part.cpp has semi-colon's where there shouldn't be any.

Code has changed in HEAD already.

> libkscan/kscandevice.cpp has a couple spelling problems and uses the wrong delete
> operator in 2 places.

Applied to both branches.
Thanks again!

David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list