Mercurial > pidgin.yaz
comparison src/gtkblist.c @ 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 | 183c177d8cdd |
children | 5fb687f9965c |
comparison
equal
deleted
inserted
replaced
13683:59a86d70825b | 13684:a104ce6e2cca |
---|---|
3426 | 3426 |
3427 /* Use Pango to separate by words. */ | 3427 /* Use Pango to separate by words. */ |
3428 len = g_utf8_strlen(normalized, -1); | 3428 len = g_utf8_strlen(normalized, -1); |
3429 log_attrs = g_new(PangoLogAttr, len + 1); | 3429 log_attrs = g_new(PangoLogAttr, len + 1); |
3430 | 3430 |
3431 pango_get_log_attrs(normalized, len, -1, NULL, log_attrs, len + 1); | 3431 pango_get_log_attrs(normalized, strlen(normalized), -1, NULL, log_attrs, len + 1); |
3432 | 3432 |
3433 word = normalized; | 3433 word = normalized; |
3434 result = TRUE; | 3434 result = TRUE; |
3435 for (i = 0; i < (len - 1) ; i++) | 3435 for (i = 0; i < (len - 1) ; i++) |
3436 { | 3436 { |