changeset 29631:e3eda7aa0653

jabber: Use a 129 byte buffer to fit the hex output of SHA-512 (including \0) (I believe purple_cipher_digest_to_str should check the input length). Maybe we should add way for ciphers to report the digest length...
author Marcus Lundblad <ml@update.uu.se>
date Mon, 22 Mar 2010 22:23:35 +0000
parents 9f59abd49def
children a1b4795104eb 1bde873d1b94 ae615b3d3e47
files libpurple/protocols/jabber/jutil.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jutil.c	Mon Mar 22 21:34:17 2010 +0000
+++ b/libpurple/protocols/jabber/jutil.c	Mon Mar 22 22:23:35 2010 +0000
@@ -733,7 +733,7 @@
     const gchar *hash_algo)
 {
 	PurpleCipherContext *context;
-	static gchar digest[41];
+	static gchar digest[129]; /* 512 bits hex + \0 */
 
 	context = purple_cipher_context_new_by_name(hash_algo, NULL);
 	if (context == NULL)