Mercurial > pidgin
changeset 32479:bc0d1855223f
We know the length of decode_msg here.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 28 Jan 2012 06:19:17 +0000 |
parents | cd51eccbe602 |
children | 3967a194cb4e |
files | libpurple/protocols/msn/oim.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/oim.c Sat Jan 28 06:05:48 2012 +0000 +++ b/libpurple/protocols/msn/oim.c Sat Jan 28 06:19:17 2012 +0000 @@ -661,7 +661,7 @@ } if (charset && !((strncasecmp(charset, "UTF-8", 5) == 0) || (strncasecmp(charset, "UTF8", 4) == 0))) { - clean_msg = g_convert(decode_msg, strlen(decode_msg), "UTF-8", charset, NULL, NULL, NULL); + clean_msg = g_convert(decode_msg, body_len, "UTF-8", charset, NULL, NULL, NULL); if (!clean_msg) { char *clean = purple_utf8_salvage(decode_msg); @@ -677,7 +677,7 @@ g_free(decode_msg); } else { - if (!g_utf8_validate(decode_msg, -1, NULL)) { + if (!g_utf8_validate(decode_msg, body_len, NULL)) { char *clean = purple_utf8_salvage(decode_msg); purple_debug_error("msn", "Received an OIM message that is not UTF-8,"