[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Suspicous code in kdelibs-3.5.2
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2006-04-05 17:54:43
Message-ID: 200604051154.45224.aseigo () kde ! org
[Download RAW message or body]


had a few more moments...

On Wednesday 05 April 2006 08:26, Christoph Bartoschek wrote:
> ------------------------------------
> Problems involving the NULL pointer:
> ------------------------------------
>
> - dcop/dcopserver.cpp:1481
>
> If conn is NULL as indicated by line 1430, line 1481 crashes after the if
> condition.

the dcop tests are running... patch is essentially:

@@ -1427,7 +1427,8 @@
            QCString app2 = readQCString(args);
            QDataStream reply( replyData, IO_WriteOnly );
            DCOPConnection* conn = clients.find( iceConn );
-           if ( conn && !app2.isEmpty() ) {
+           if ( !conn ) return false;
+           if ( !app2.isEmpty() ) {
                if ( !conn->appId.isNull() &&
                     appIds.find( conn->appId ) == conn ) {
                    appIds.remove( conn->appId );

not sure if it is correct, however, as in "could have side effects". i don't 
see any that jump out at me, but the code isn't simplistic there and i'm not 
overly familiar with its internals so nothing would surprise me =)

> - kdeui/kcmodule.cpp:82
>
> If instance is NULL as indicated by line 78, then line 82 crashes.

fixed

> - kdeui/kiconview.cpp:199
>
> If previousItem is NULL as indicated by line 193, then line 199 crashes.

fixed

> - kdeui/kurllabel.cpp:365
>
> Line 354 indicates that e could be NULL. The dereference in line 365 and
> the following lines lead to a crash.

false positive. e is always non-null .. the check on 354 is superfluous

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

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic