Mercurial > pidgin.yaz
changeset 21949:18628d7aba30
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.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Fri, 28 Dec 2007 17:14:52 +0000 |
parents | af2c4ef3e61d |
children | d357ce994bd6 800ede833f99 60f5abc6cf0c |
files | libpurple/protocols/jabber/auth.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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