pidgin: 4687f2ad: Set a maximum conversion length to g_con...

qulogic at pidgin.im qulogic at pidgin.im
Mon Aug 3 23:55:40 EDT 2009


-----------------------------------------------------------------
Revision: 4687f2ad1aa97d621e389533af53704e6066f35a
Ancestor: 3708b69ca30b804f9c8eba37bd25bcce51466900
Author: qulogic at pidgin.im
Date: 2009-08-04T03:51:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4687f2ad1aa97d621e389533af53704e6066f35a

Modified files:
        libpurple/protocols/msn/slp.c

ChangeLog: 

Set a maximum conversion length to g_convert when determining the file name
for a MSN transfer.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	92ca8c0c8d33b56e326f79b30cc3a875d2b3d4b8
+++ libpurple/protocols/msn/slp.c	f1edd60ec804b12a034dc16c9be80e989764ec5a
@@ -341,8 +341,8 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 			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);
 


More information about the Commits mailing list