Suspicious code in revision 864329

View: New views
4 Messages — Rating Filter:   Alert me  

Suspicious code in revision 864329

by Bugzilla from bartoschek@gmx.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

- kdebase/workspace/plasma/containments/panel/panel.cpp:319
  kdebase/workspace/plasma/containments/mid-panel/panel.cpp:261

This if statement is always true because the compiler reads
(form == Plasma::Horizontal) || Plasma::Vertical and
Plasma::Vertical is not 0.

- kdebase/workspace/plasma/shells/desktop/panelview.cpp:82

Line 74 indicates that panel could be NULL here.

- kdebase/apps/konqueror/src/konqview.cpp:196

Line 175 indicates that m_pPart could be NULL here. Same for lines 150 and
168.

- kdebase/workspace/kwin/scene_xrender.cpp:528, 533
  kdebase/workspace/kwin/scene_opengl.cpp:1318, 1323
 
This if statements cannot be true because this cases are already handled by
lines 526 and 1316

- kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc:635

Line 604 indicates that mVerticalLinesDistance can be 0. If this is the case
and the execution reaches this line, then a devision by 0 is the result.

- kdebase/workspace/ksysguard/gui/WorkSheet.cc:548, 551

If the condition in line 538 is false then newDisplay is NULL here.

- kdebase/workspace/powerdevil/kcmodule/CapabilitiesPage.cpp:205

There is no need to confuse the reader and use the bitwise-or here.


- kdebase/workspace/powerdevil/kcmodule/CapabilitiesPage.cpp:304

If line 270 is false and line 278 is false but line 298 is true, then butly
is NULL here.

- kdebase/workspace/kcontrol/kfontinst/kcmfontinst/FontList.cpp:641

Consider including <cmath> to see all overloads of abs().

- kdesvn/kdesdk/umbrello/umbrello/uml.cpp:2262

If cmd == NULL in line 2259 then this line crashes.

- kdepim/kmail/kmfoldertree.cpp:1996

Line 2031 indicates that parent can be NULL here. This means that during the
next iteration of the loop starting at 1988 it can also be NULL here.

- kdepim/kmail/foldertreebase.cpp:224, 216

Line 188 indicates that folder can be NULL here.

- kdepim/kmail/kmfoldercachedimap.cpp:3074

Line 3067 indicates that inboxDir can be NULL here.

- kdepim/kmail/kmmainwidget.cpp:1953

Line 1946 and others indicate that mMsgView can be NULL here.

Re: Suspicious code in revision 864329

by Bugzilla from aseigo@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 24 September 2008, Christoph Bartoschek wrote:

> - kdebase/workspace/plasma/containments/panel/panel.cpp:319
>   kdebase/workspace/plasma/containments/mid-panel/panel.cpp:261
>
> This if statement is always true because the compiler reads
> (form == Plasma::Horizontal) || Plasma::Vertical and
> Plasma::Vertical is not 0.
>
> - kdebase/workspace/plasma/shells/desktop/panelview.cpp:82
>
> Line 74 indicates that panel could be NULL here.
>
> - kdebase/apps/konqueror/src/konqview.cpp:196
>
> Line 175 indicates that m_pPart could be NULL here. Same for lines 150 and
> 168.
all the above are now fixed.

--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech



signature.asc (204 bytes) Download Attachment

Re: Suspicious code in revision 864329

by Lubos Lunak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 25 of September 2008, Christoph Bartoschek wrote:
> - kdebase/workspace/kwin/scene_xrender.cpp:528, 533
>   kdebase/workspace/kwin/scene_opengl.cpp:1318, 1323
>
> This if statements cannot be true because this cases are already handled by
> lines 526 and 1316

 Fixed.

--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak@... , l.lunak@...
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz

Re: Suspicious code in revision 864329

by Bugzilla from mcguire@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 25 September 2008 01:23:50 Christoph Bartoschek wrote:

> - kdepim/kmail/kmfoldertree.cpp:1996
> [..]
> - kdepim/kmail/foldertreebase.cpp:224, 216
> [..]
> - kdepim/kmail/kmfoldercachedimap.cpp:3074
> [..]
> - kdepim/kmail/kmmainwidget.cpp:1953
> [..]

All of those fixed in r866389, thanks!

Regards,
Thomas



signature.asc (201 bytes) Download Attachment
LightInTheBox - Buy quality products at wholesale price!