Bug 471938 - pidgin segfaults on sametime/meanwhile login redirect to NULL
pidgin segfaults on sametime/meanwhile login redirect to NULL
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: pidgin (Show other bugs)
10
All Linux
medium Severity high
: ---
: ---
Assigned To: Warren Togami
Fedora Extras Quality Assurance
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-17 14:07 EST by Chris Weyl
Modified: 2009-01-13 09:27 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-13 09:27:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Weyl 2008-11-17 14:07:12 EST
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 16:07:56 EST
--- 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 16:37:42 EST
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 13:32:48 EST
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 00:31:46 EST
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.