changeset 13684:a104ce6e2cca

[gaim-migrate @ 16087] SF Patch #1475008 from Wan Hing Wah "fix crash when search in buddylist containing non-ascii text" "the len parameter of pango_get_log_attrs should be in length of bytes instead of length of utf8 characters. This cause crash when the buddly list name contain international character where strlen(normalized) != g_utf8_strlen(normalized). reproducable on gaim svn trunk" committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 24 Apr 2006 19:57:23 +0000
parents 59a86d70825b
children 039cc76492b0
files COPYRIGHT src/gtkblist.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sun Apr 23 22:05:14 2006 +0000
+++ b/COPYRIGHT	Mon Apr 24 19:57:23 2006 +0000
@@ -294,6 +294,7 @@
 David Vermeille
 Sid Vicious
 Bjoern Voigt
+Wan Hing Wah
 Philip Walford
 Nathan Walp
 Eric Warmenhoven
--- a/src/gtkblist.c	Sun Apr 23 22:05:14 2006 +0000
+++ b/src/gtkblist.c	Mon Apr 24 19:57:23 2006 +0000
@@ -3428,7 +3428,7 @@
 	len = g_utf8_strlen(normalized, -1);
 	log_attrs = g_new(PangoLogAttr, len + 1);
 
-	pango_get_log_attrs(normalized, len, -1, NULL, log_attrs, len + 1);
+	pango_get_log_attrs(normalized, strlen(normalized), -1, NULL, log_attrs, len + 1);
 
 	word = normalized;
 	result = TRUE;