im.pidgin.pidgin: 7f8e027e1591ade622baf58a9dac216e7122c1ac

evands at pidgin.im evands at pidgin.im
Fri Dec 28 12:20:40 EST 2007


-----------------------------------------------------------------
Revision: 7f8e027e1591ade622baf58a9dac216e7122c1ac
Ancestor: 9235f843c3fc8f51715018c58ceb47071bc89cf6
Author: evands at pidgin.im
Date: 2007-12-28T17:14:52
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/jabber/auth.c

ChangeLog: 

Ensure js->sasl is not NULL before using it in jabber_auth_handle_success(). This was, I believe, the source of the crash stu reported when my DIGEST-MD5 hack was in place; while js->sasl will probably be non-NULL whenever we reach this code point now, it's more robust to verify it here since that's an assumption originating in another function.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth.c	c7157e2b2625e9be09dd8b2c201b1d3dcc72fd19
+++ libpurple/protocols/jabber/auth.c	4afae6a57c5b5faea532c149891ab5d29ed915e2
@@ -1077,10 +1077,12 @@ void jabber_auth_handle_success(JabberSt
 		}
 	}
 	/* If we've negotiated a security layer, we need to enable it */
-	sasl_getprop(js->sasl, SASL_SSF, &x);
-	if (*(int *)x > 0) {
-		sasl_getprop(js->sasl, SASL_MAXOUTBUF, &x);
-		js->sasl_maxbuf = *(int *)x;
+	if (js->sasl) {
+		sasl_getprop(js->sasl, SASL_SSF, &x);
+		if (*(int *)x > 0) {
+			sasl_getprop(js->sasl, SASL_MAXOUTBUF, &x);
+			js->sasl_maxbuf = *(int *)x;
+		}
 	}
 #endif
 


More information about the Commits mailing list