Suspicous code in KDE 4 trunk r764353

Ismail Dönmez ismail at pardus.org.tr
Tue Jan 22 03:24:04 GMT 2008


Tuesday 22 January 2008 01:21:42 tarihinde Christoph Bartoschek şunları 
yazmıştı:
> - kdegames/kbattleship/src/networkdialog.cpp:191
>
> server is deleted in 188 and deleted again here.

Fixed.

> - kdebase/runtime/kioslave/sftp/process.cpp:429
>   kdebase/runtime/kioslave/sftp/process.cpp:423
>
> The condition < 0 is always false because ! results in 0 or 1.
>
>
> - kdebase/runtime/kioslave/sftp/process.cpp:207
>
> The file descriptor from line 191 is leaking here.

Fixed.

> - kdebase/apps/konsole/src/TerminalDisplay.cpp:2742
>
> A break statement or a fall-through comment should be here.

Fixed.

> kdebase/workspace/libs/ksysguard/processcore/processes_linux_p.cpp:365-377
>
> There are break; statements missing.
>
>
> - kdebase/workspace/libs/ksysguard/processcore/processes_remote_p.cpp:42
>
> ppidColumn is assigned twice. Undefined behaviour.

Fixed.

> - kdebase/workspace/libs/plasma/phase.cpp:257
>   kdebase/workspace/libs/plasma/phase.cpp:295
>
> Division by zero if frames is 1 or 2  (or 1 in line 295).
> Line 280 and 244 only catch the value 0. But frames is divided and
> an integer in lines 255 and 293.
>
>
> - kdebase/workspace/libs/plasma/desktoptoolbox.cpp:207
>
> If m_toolBacker is NULL a crash is sure here. I guess the ! is
> not intended here.

Fixed.

> - kdebase/workspace/klipper/configdialog.cpp:361
>
> Maybe action is NULL if line 353 is true and line 354 true on the first
> iteration.

Fixed.

> - kdebase/workspace/kcontrol/kfontinst/kcmfontinst/JobRunner.cpp:294
>
> A break is missing.

Fixed.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.




More information about the kde-core-devel mailing list