Mercurial > pidgin.yaz
changeset 12549:1e0caf8f40dc
[gaim-migrate @ 14867]
maybe fix 1384317
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 18 Dec 2005 18:21:27 +0000 |
parents | 6503701eb44f |
children | 7f0f68ae1f5a |
files | src/protocols/jabber/auth.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c Sun Dec 18 17:38:05 2005 +0000 +++ b/src/protocols/jabber/auth.c Sun Dec 18 18:21:27 2005 +0000 @@ -541,21 +541,21 @@ guchar result[16]; size_t a1len; - gchar *a1, *convnode, *convpasswd, *ha1, *ha2, *kd, *x, *z; + gchar *a1, *convnode=NULL, *convpasswd = NULL, *ha1, *ha2, *kd, *x, *z; if((convnode = g_convert(jid->node, strlen(jid->node), "iso-8859-1", "utf-8", NULL, NULL, NULL)) == NULL) { convnode = g_strdup(jid->node); } - if((convpasswd = g_convert(passwd, strlen(passwd), "iso-8859-1", "utf-8", - NULL, NULL, NULL)) == NULL) { + if(passwd && ((convpasswd = g_convert(passwd, strlen(passwd), "iso-8859-1", + "utf-8", NULL, NULL, NULL)) == NULL)) { convpasswd = g_strdup(passwd); } cipher = gaim_ciphers_find_cipher("md5"); context = gaim_cipher_context_new(cipher, NULL); - x = g_strdup_printf("%s:%s:%s", convnode, realm, convpasswd); + x = g_strdup_printf("%s:%s:%s", convnode, realm, convpasswd ? convpasswd : ""); gaim_cipher_context_append(context, (const guchar *)x, strlen(x)); gaim_cipher_context_digest(context, sizeof(result), result, NULL);