# HG changeset patch # User Nathan Walp # Date 1066166240 0 # Node ID d565594c1bae1127d7f68a1b16dafa24949d2bf7 # Parent deab8d8bbb4e2acb191e436f592b0e39d07f26c5 [gaim-migrate @ 7842] fix the base64 encode function to allocate the right amount of memory. this fixes an issue logging into jabberd 2.0 servers, and probably a few other things committer: Tailor Script diff -r deab8d8bbb4e -r d565594c1bae src/util.c --- a/src/util.c Tue Oct 14 17:12:17 2003 +0000 +++ b/src/util.c Tue Oct 14 21:17:20 2003 +0000 @@ -142,7 +142,7 @@ g_return_val_if_fail(in != NULL, NULL); g_return_val_if_fail(inlen > 0, NULL); - rv = out = g_malloc((4 * (inlen + 1)) / 3 + 1); + rv = out = g_malloc(((inlen/3)+1)*4 + 1); for (; inlen >= 3; inlen -= 3) {