Mercurial > pidgin.yaz
diff src/protocols/jabber/buddy.c @ 11127:719779387f96
[gaim-migrate @ 13183]
Change the base16 and base64 functions to use better data types,
and make appropriate changes to other parts of the Gaim code
to get rid of a few warnings and hopefully make things more
correct.
In other news, why is CVS HEAD crashing for me on exit?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 19 Jul 2005 05:15:45 +0000 |
parents | cef48e318125 |
children | 096020ae09a9 |
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c Tue Jul 19 03:51:54 2005 +0000 +++ b/src/protocols/jabber/buddy.c Tue Jul 19 05:15:45 2005 +0000 @@ -385,7 +385,7 @@ if(avatar_file && g_file_get_contents(avatar_file, (gchar **)&avatar_data, &avatar_len, &error)) { xmlnode *photo, *binval; - unsigned char *enc; + gchar *enc; int i; unsigned char hashval[20]; char *p, hash[41]; @@ -809,12 +809,14 @@ xmlnode *binval; if((binval = xmlnode_get_child(child, "BINVAL")) && (bintext = xmlnode_get_data(binval))) { - int size, i; + gsize size; + guint8 *data; + int i; unsigned char hashval[20]; - char *data, *p, hash[41]; + char *p, hash[41]; gboolean photo = (strcmp(child->name, "PHOTO") == 0); - gaim_base64_decode(text, &data, &size); + data = gaim_base64_decode(text, &size); imgids = g_slist_prepend(imgids, GINT_TO_POINTER(gaim_imgstore_add(data, size, "logo.png"))); g_string_append_printf(info_text,