Bug 471938 - pidgin segfaults on sametime/meanwhile login redirect to NULL
Summary: pidgin segfaults on sametime/meanwhile login redirect to NULL
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pidgin
Version: 10
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Warren Togami
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-17 19:07 UTC by Chris Weyl
Modified: 2009-01-13 14:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-13 14:27:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chris Weyl 2008-11-17 19:07:12 UTC
The sametime prpl code in the current level of pidgin in Fedora (2.5.2-1) does not check to ensure that the host given in a server redirect on login is not NULL.  

Adding an additional test for "(! host)" at libpurple/protocols/sametime/sametime.c line 1448 resolves this issue for me.

Comment 1 Warren Togami 2008-11-20 21:07:56 UTC
--- pidgin-2.5.2.orig/libpurple/protocols/sametime/sametime.c	2008-08-07 09:31:09.000000000 -0400
+++ pidgin-2.5.2/libpurple/protocols/sametime/sametime.c	2008-11-20 16:07:04.000000000 -0500
@@ -1446,6 +1446,7 @@
 
   if(purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
      (! strcmp(current_host, host)) ||
+     (! host) ||
      (purple_proxy_connect(NULL, account, host, port, connect_cb, pd) == NULL)) {
 
     /* if we're configured to force logins, or if we're being


Proposing this for upstream.

Comment 2 Chris Weyl 2008-11-20 21:37:42 UTC
That will fail, as the segfault is in the strcmp(), and you're checking host for nullity after the call.

Until upstream accepts it, can we patch pidgin for Fedora?  This is causing a fair bit of trouble at $work.

Comment 3 Warren Togami 2008-11-21 18:32:48 UTC
diff -urN pidgin-2.5.2.orig/libpurple/protocols/sametime/sametime.c pidgin-2.5.2/libpurple/protocols/sametime/sametime.c
--- pidgin-2.5.2.orig/libpurple/protocols/sametime/sametime.c   2008-08-07 09:31:09.000000000 -0400
+++ pidgin-2.5.2/libpurple/protocols/sametime/sametime.c        2008-11-20 16:18:18.000000000 -0500
@@ -1444,7 +1444,8 @@
   current_host = purple_account_get_string(account, MW_KEY_HOST,
                                         MW_PLUGIN_DEFAULT_HOST);

-  if(purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
+  if((! host) ||
+     purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
      (! strcmp(current_host, host)) ||
      (purple_proxy_connect(NULL, account, host, port, connect_cb, pd) == NULL)) {

Yes, including this in the next build.

Comment 4 Bug Zapper 2008-11-26 05:31:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.