/pidgin/main: 90aea2dd2e4e: Merge with release-2.x.y - gg.c didn...
Daniel Atallah
datallah at pidgin.im
Sat Nov 23 12:53:41 EST 2013
Changeset: 90aea2dd2e4e71c23e32c9547e5ca60c1c00bd11
Author: Daniel Atallah <datallah at pidgin.im>
Date: 2013-11-23 12:52 -0500
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/90aea2dd2e4e
Description:
Merge with release-2.x.y - gg.c didn't merge cleanly, so Tomasz is going to need to fix it
diffstat:
ChangeLog | 6 +++++-
libpurple/protocols/gg/lib/handlers.c | 2 +-
pidgin/gtkthemes.c | 17 +++++++++++++++--
3 files changed, 21 insertions(+), 4 deletions(-)
diffs (83 lines):
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,9 +60,13 @@ version 3.0.0 (??/??/????):
General:
* Add support for Python3 in build scripts. (Ashish Gupta) (#15624)
+ Gadu-Gadu:
+ * Disabled buddy list import/export from/to server (it didn't worked
+ anymore). Buddy list synchronization will be implemented in 3.0.0.
+
Windows-Specific Changes:
* Updates to dependencies:
- * NSS 3.14.3 and NSPR 4.9.5
+ * NSS 3.15.2 and NSPR 4.10.1
version 2.10.7 (02/13/2013):
Alien hatchery:
diff --git a/libpurple/protocols/gg/lib/handlers.c b/libpurple/protocols/gg/lib/handlers.c
--- a/libpurple/protocols/gg/lib/handlers.c
+++ b/libpurple/protocols/gg/lib/handlers.c
@@ -1755,7 +1755,7 @@ static const gg_packet_handler_t handler
{ GG_DISCONNECT_ACK, GG_STATE_DISCONNECTING, 0, gg_session_handle_disconnect_ack },
{ GG_XML_EVENT, GG_STATE_CONNECTED, 0, gg_session_handle_xml_event },
{ GG_PUBDIR50_REPLY, GG_STATE_CONNECTED, 0, gg_session_handle_pubdir50_reply },
- { GG_USERLIST_REPLY, GG_STATE_CONNECTED, 0, gg_session_handle_userlist_reply },
+ { GG_USERLIST_REPLY, GG_STATE_CONNECTED, sizeof(char), gg_session_handle_userlist_reply },
{ GG_DCC7_ID_REPLY, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_id_reply), gg_session_handle_dcc7_id_reply },
{ GG_DCC7_ACCEPT, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_accept), gg_session_handle_dcc7_accept },
{ GG_DCC7_NEW, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_new), gg_session_handle_dcc7_new },
diff --git a/pidgin/gtkthemes.c b/pidgin/gtkthemes.c
--- a/pidgin/gtkthemes.c
+++ b/pidgin/gtkthemes.c
@@ -207,9 +207,10 @@ pidgin_smiley_themes_remove_non_existing
void pidgin_themes_load_smiley_theme(const char *file, gboolean load)
{
- FILE *f = g_fopen(file, "r");
+ FILE *f = g_fopen(file, "rb");
char buf[256];
char *i;
+ gsize line_nbr = 0;
struct smiley_theme *theme=NULL;
struct smiley_list *list = NULL;
GSList *lst = smiley_themes;
@@ -245,6 +246,7 @@ void pidgin_themes_load_smiley_theme(con
if (!fgets(buf, sizeof(buf), f)) {
break;
}
+ line_nbr++;
if (buf[0] == '#' || buf[0] == '\0')
continue;
@@ -256,6 +258,11 @@ void pidgin_themes_load_smiley_theme(con
continue;
}
+ if (! g_utf8_validate(buf, -1, NULL)) {
+ purple_debug_error("gtkthemes", "%s:%d is invalid UTF-8\n", file, line_nbr);
+ continue;
+ }
+
i = buf;
while (isspace(*i))
i++;
@@ -296,10 +303,16 @@ void pidgin_themes_load_smiley_theme(con
while (*i) {
char l[64];
gsize li = 0;
+ char *next;
while (*i && !isspace(*i) && li < sizeof(l) - 1) {
if (*i == '\\' && *(i+1) != '\0')
i++;
- l[li++] = *(i++);
+ next = g_utf8_next_char(i);
+ if ((next - i) > (sizeof(l) - li -1)) {
+ break;
+ }
+ while (i != next)
+ l[li++] = *(i++);
}
l[li] = 0;
if (!sfile) {
More information about the Commits
mailing list