# HG changeset patch # User Paul Aurich # Date 1259903246 0 # Node ID a6cd1db77aee90fc47d3f5f55dc4593cf5db7591 # Parent 5af6304fde5d11865b1e0452a37e6de427e019c6 jabber: Ugh, make this C89-compliant. Bah. diff -r 5af6304fde5d -r a6cd1db77aee libpurple/protocols/jabber/auth_scram.c --- a/libpurple/protocols/jabber/auth_scram.c Thu Dec 03 17:00:54 2009 +0000 +++ b/libpurple/protocols/jabber/auth_scram.c Fri Dec 04 05:07:26 2009 +0000 @@ -140,10 +140,12 @@ GString *pass = g_string_new(data->password); guchar *salted_password; - guchar client_key[hash_len]; - guchar stored_key[hash_len]; - guchar client_signature[hash_len]; - guchar server_key[hash_len]; + guchar *client_key, *stored_key, *client_signature, *server_key; + + client_key = g_new0(guchar, hash_len); + stored_key = g_new0(guchar, hash_len); + client_signature = g_new0(guchar, hash_len); + server_key = g_new0(guchar, hash_len); data->client_proof = g_string_sized_new(hash_len); data->client_proof->len = hash_len; @@ -176,6 +178,11 @@ for (i = 0; i < hash_len; ++i) data->client_proof->str[i] = client_key[i] ^ client_signature[i]; + g_free(server_key); + g_free(client_signature); + g_free(stored_key); + g_free(client_key); + return TRUE; }