1 |
pva 11/10/02 18:13:17 |
2 |
|
3 |
Added: pidgin-2.10.0-utf8-validation.patch |
4 |
Removed: pidgin-2.8.0-finch-icq.patch |
5 |
pidgin-2.7.2-ldflags.patch |
6 |
pidgin-2.9.0-conversation.c.patch |
7 |
pidgin-2.7.3-ldflags.patch |
8 |
Log: |
9 |
Fix heap-based buffer overflow, bug #385073 thank Sean Amoss for report. Drop old. |
10 |
|
11 |
(Portage version: 2.1.10.20/cvs/Linux x86_64) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 net-im/pidgin/files/pidgin-2.10.0-utf8-validation.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/pidgin/files/pidgin-2.10.0-utf8-validation.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/pidgin/files/pidgin-2.10.0-utf8-validation.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: pidgin-2.10.0-utf8-validation.patch |
20 |
=================================================================== |
21 |
# |
22 |
# |
23 |
# patch "libpurple/protocols/silc/ops.c" |
24 |
# from [30ab18780af11a53b6564a44c4e8ebfc1a296d78] |
25 |
# to [80bd9a7d3faf9e5ef28438647159fe19847e9839] |
26 |
# |
27 |
============================================================ |
28 |
--- libpurple/protocols/silc/ops.c 30ab18780af11a53b6564a44c4e8ebfc1a296d78 |
29 |
+++ libpurple/protocols/silc/ops.c 80bd9a7d3faf9e5ef28438647159fe19847e9839 |
30 |
@@ -408,9 +408,16 @@ silc_private_message(SilcClient client, |
31 |
} |
32 |
|
33 |
if (flags & SILC_MESSAGE_FLAG_UTF8) { |
34 |
- tmp = g_markup_escape_text((const char *)message, -1); |
35 |
+ const char *msg = (const char *)message; |
36 |
+ char *salvaged = NULL; |
37 |
+ if (!g_utf8_validate((const char *)message, -1, NULL)) { |
38 |
+ salvaged = purple_utf8_salvage((const char *)message); |
39 |
+ msg = salvaged; |
40 |
+ } |
41 |
+ tmp = g_markup_escape_text(msg, -1); |
42 |
/* Send to Purple */ |
43 |
serv_got_im(gc, sender->nickname, tmp, 0, time(NULL)); |
44 |
+ g_free(salvaged); |
45 |
g_free(tmp); |
46 |
} |
47 |
} |