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

List:       kopete-devel
Subject:    [kopete-devel] [patch] [bug 166465] Gadu-Gadu protocol crashes
From:       Kamil Kaminski <kamil () mrblur ! net>
Date:       2008-07-26 11:37:34
Message-ID: 488B0C7E.3080902 () mrblur ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi,
Kopete Gadu-Gadu protocol causes SEGFAULTs after logging in. The problem 
is that GaduContactList() assumes static CSV column count. Problem
occurs if someone has 12/13 columns in his contact list but no 14'th.

This patch simply checks that strList.count() is big enough to access 
next stringIterator. Works perfectly with my "broken" contact list.

Closes bug #166465

Regards,
Kamil Kamiński

["gaducontactlist.diff" (text/plain)]

Index: protocols/gadu/gaducontactlist.cpp
===================================================================
--- protocols/gadu/gaducontactlist.cpp	(wersja 837988)
+++ protocols/gadu/gaducontactlist.cpp	(kopia robocza)
@@ -104,10 +104,10 @@
 			++stringIterator;
 			++stringIterator;
 
-			if ( stringIterator != strList.end() ) {
+			if ( strList.count() >= 13 )
 				cl.offlineTo = (*++stringIterator) == QString('0') ? false : true;
+			if ( strList.count() >= 14 )
 				cl.landline  = (*++stringIterator);
-			}
         	}
 		else {
 			 cl.email	= empty;

["smime.p7s" (application/x-pkcs7-signature)]

_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel


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

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