Suspicous code in kdelibs-3.5.2
Aaron J. Seigo
aseigo at kde.org
Wed Apr 5 18:54:43 BST 2006
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060405/c619634e/attachment.sig>
More information about the kde-core-devel
mailing list