# HG changeset patch # User Evan Schoenberg # Date 1198862092 0 # Node ID 18628d7aba30cb4aa01685a36b185bce7aeac2a0 # Parent af2c4ef3e61d1a7b7ab32031fab116f7c673b098 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. diff -r af2c4ef3e61d -r 18628d7aba30 libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Fri Dec 28 05:54:50 2007 +0000 +++ b/libpurple/protocols/jabber/auth.c Fri Dec 28 17:14:52 2007 +0000 @@ -1077,10 +1077,12 @@ } } /* 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