# HG changeset patch # User Nathan Walp # Date 1134930087 0 # Node ID 1e0caf8f40dc472d4c0c2982ffa6acf35ab5a88b # Parent 6503701eb44f119253703f0fc882c34420d0389c [gaim-migrate @ 14867] maybe fix 1384317 committer: Tailor Script diff -r 6503701eb44f -r 1e0caf8f40dc src/protocols/jabber/auth.c --- 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);