From: Nathan W. <fac...@us...> - 2003-10-14 21:17:24
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv31861/src Modified Files: util.c Log Message: 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 Index: util.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/util.c,v retrieving revision 1.228 retrieving revision 1.229 diff -u -d -p -r1.228 -r1.229 --- util.c 14 Oct 2003 16:44:35 -0000 1.228 +++ util.c 14 Oct 2003 21:17:20 -0000 1.229 @@ -142,7 +142,7 @@ gaim_base64_encode(const unsigned char * 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) { |