changeset 28157:bf7039a638b7

Set a maximum conversion length to g_convert when determining the file name for a MSN transfer.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 04 Aug 2009 03:51:30 +0000
parents 0cd438c47ab3
children 6ef1f49d6b6c
files libpurple/protocols/msn/slp.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c	Tue Aug 04 03:49:01 2009 +0000
+++ b/libpurple/protocols/msn/slp.c	Tue Aug 04 03:51:30 2009 +0000
@@ -341,8 +341,8 @@
 			bin = (char *)purple_base64_decode(context, &bin_len);
 			file_size = GUINT32_FROM_LE(*(gsize *)(bin + 8));
 
-			file_name = g_convert(bin + 20, -1, "UTF-8", "UTF-16LE",
-			                      NULL, NULL, NULL);
+			file_name = g_convert(bin + 20, MAX_FILE_NAME_LEN, "UTF-8", "UTF-16LE",
+			                      NULL, NULL, &error);
 
 			g_free(bin);