diff libpurple/protocols/jabber/jabber.c @ 29630:9f59abd49def

jabber: Validate the hash on incoming BoB objects (in case the CID is on the form algo+hash@bob.xmpp.org).
author Marcus Lundblad <ml@update.uu.se>
date Mon, 22 Mar 2010 21:34:17 +0000
parents 6e598ca344b3
children 08957bb38e30 ae615b3d3e47
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Mon Mar 22 20:15:55 2010 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Mar 22 21:34:17 2010 +0000
@@ -980,8 +980,8 @@
 	image = purple_buddy_icons_find_account_icon(account);
 	if (image != NULL) {
 		js->initial_avatar_hash =
-			jabber_calculate_data_sha1sum(purple_imgstore_get_data(image),
-					purple_imgstore_get_size(image));
+			jabber_calculate_data_hash(purple_imgstore_get_data(image),
+					purple_imgstore_get_size(image), "sha1");
 		purple_imgstore_unref(image);
 	}