/soc/2012/tomkiewicz/gg: ebe07a1dd09e: Merge blist bugfix from t...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Sat Jul 14 10:31:28 EDT 2012


Changeset: ebe07a1dd09ef554e68859d189b1e9f3969efde3
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-07-14 16:31 +0200
Branch:	 soc.2012.gg
URL: http://hg.pidgin.im/soc/2012/tomkiewicz/gg/rev/ebe07a1dd09e

Description:

Merge blist bugfix from trunk

diffstat:

 .hgtags                           |      2 +
 .tx/config                        |      3 +-
 ChangeLog                         |     16 +-
 ChangeLog.API                     |      3 +
 Makefile.am                       |     23 +-
 libpurple/blist.c                 |      3 +
 libpurple/protocols/msn/oim.c     |      2 +-
 libpurple/protocols/mxit/markup.c |      7 +-
 pidgin/gtkaccount.c               |      6 +-
 pidgin/gtkblist.c                 |      4 -
 pidgin/gtkconv.c                  |     36 +-
 pidgin/gtkconvwin.h               |     18 +-
 pidgin/gtkdialogs.c               |     37 +-
 pidgin/gtkwebview.c               |     17 +
 pidgin/gtkwebview.h               |     11 +
 pidgin/plugins/xmppconsole.c      |     17 +-
 po/ChangeLog                      |      9 +-
 po/my_MM.po                       |  16571 +++++++++++++----------------------
 po/nn.po                          |    545 +-
 19 files changed, 6465 insertions(+), 10865 deletions(-)

diffs (truncated from 26284 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -84,3 +84,5 @@
 fbe2ce8d288fe7e2ab4bf180a537664ef7f8e907 v2.10.2
 dab0253fe3754ffd68e070cdfbbf31cd79f9a421 v2.10.3
 1d00b9e4aa6add6dca97cca4ac614d63bd105dfd v2.10.4
+a3d157700972b48cf0a23b300261a5ab0c6e165b v2.10.5
+4992bd90d8ad78ebdd324dd90d3e9d443f7dd002 v2.10.6
diff --git a/.tx/config b/.tx/config
--- a/.tx/config
+++ b/.tx/config
@@ -1,8 +1,7 @@
 [main]
-host = https://www.transifex.net
+host = https://www.transifex.com
 
 [pidgin.pidgin]
 file_filter = po/<lang>.po
 source_file = po/pidgin.pot
 source_lang = en
-
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,7 +47,12 @@
 	* The Offline Message Emulation plugin now adds a note that the message
 	  was an offline message. (Flavius Anton) (#2497)
 
-version 2.10.5:
+version 2.10.6 (07/06/2012):
+	Pidgin:
+	* Fix a bug that requires a triple-click to open a conversation
+	  window from the buddy list. (#15199)
+
+version 2.10.5 (07/05/2012):
 	libpurple:
 	* Add support for GNOME3 proxy settings. (Mihai Serban) (#15054)
 
@@ -55,6 +60,15 @@
 	* Fix a crash that may occur when trying to ignore a user who is
 	  not in the current chat room. (#15139)
 
+	MSN:
+	* Fix building with MSVC on Windows (broken in 2.10.4). (Florian
+	  Quèze)
+
+	MXit:
+	* Fix a buffer overflow vulnerability when parsing incoming messages
+	  containing inline images.  Thanks to Ulf Härnhammar for reporting
+	  this! (CVE-2012-3374)
+
 version 2.10.4 (05/06/2012):
 	General:
 	* Support building against Farstream in addition to Farsight.
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -247,6 +247,9 @@
 		* xmlnode_set_attrib_with_namespace
 		* xmlnode_set_attrib_with_prefix
 
+version 2.10.6:
+	* No changes
+
 version 2.10.5:
 	* No changes
 
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,35 +32,36 @@
 
 commit-check:
 	(cd po ; intltool-update -m 2>&1 | grep -v '^mismatched quotes.*\.py$$' | sed "s|current directory|po directory|" | grep . ; if [ $$? = 0 ] ; then exit 1 ; else exit 0 ; fi)
+
+# Ensure these files are sorted and contain no duplicates:
 	LC_ALL=C sort -c -t/ -u po/POTFILES.in
 	LC_ALL=C sort -c -t/ -u po/POTFILES.skip
+
+# Ensure COPYRIGHT is 100% UTF-8
 	iconv -f utf8 -t utf8 COPYRIGHT | cmp COPYRIGHT -
 
-version-check: commit-check
-# We don't want to release development versions.
+version-check:
+# Ensure our version string does not contain "dev"
 	test x`echo $(PACKAGE_VERSION) | grep dev` = x
 
-# When doing a new minor (or major) release (X.Y.0), there must be a section in
-# ChangeLog.API.
-	echo $(PACKAGE_VERSION) | grep -v "^[0-9]\+\.[0-9]\+\.0$$" >/dev/null || head ChangeLog.API | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
-
-# For all releases, check the ChangeLogs.
-	head ChangeLog | grep "^version $(PACKAGE_VERSION) (`date +%m/%d/%Y`):$$" >/dev/null
-	head po/ChangeLog | grep "^version $(PACKAGE_VERSION)$$" >/dev/null
+# Ensure ChangeLogs have the correct version
+	head ChangeLog     | grep "^version $(PACKAGE_VERSION) (.*):$$" >/dev/null
+	head ChangeLog.API | grep "^version $(PACKAGE_VERSION):$$" >/dev/null
+	head po/ChangeLog  | grep "^version $(PACKAGE_VERSION)$$" >/dev/null
 
 # Ensure we're working from a tag...
 	test x`hg log -r "tag($(PACKAGE_VERSION))" --template "{node}"` = x`hg id -i --debug`
 # ... and have no changes in the working copy. (this isn't really necessary with hg because hg id appends a "+")
 	test "x`hg st -mard`" = x
 
-release: version-check distcheck packages
-
 packages:
 	gpg -ab pidgin-$(PACKAGE_VERSION).tar.gz
 	gpg -ab pidgin-$(PACKAGE_VERSION).tar.bz2
 	gpg --verify pidgin-$(PACKAGE_VERSION).tar.gz.asc pidgin-$(PACKAGE_VERSION).tar.gz
 	gpg --verify pidgin-$(PACKAGE_VERSION).tar.bz2.asc pidgin-$(PACKAGE_VERSION).tar.bz2
 
+release: commit-check version-check distcheck packages
+
 if INSTALL_I18N
 PO_DIR=po
 DESKTOP_FILE=pidgin.desktop
diff --git a/libpurple/blist.c b/libpurple/blist.c
--- a/libpurple/blist.c
+++ b/libpurple/blist.c
@@ -2068,11 +2068,13 @@
 {
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
 	PurpleBlistNode *node, *gnode;
+	PurpleGroup *group;
 
 	g_return_if_fail(contact != NULL);
 
 	node = (PurpleBlistNode *)contact;
 	gnode = node->parent;
+	group = PURPLE_GROUP(gnode);
 
 	if (node->child) {
 		/*
@@ -2097,6 +2099,7 @@
 			node->prev->next = node->next;
 		if (node->next)
 			node->next->prev = node->prev;
+		group->totalsize--;
 
 		/* Update the UI */
 		if (ops && ops->remove)
diff --git a/libpurple/protocols/msn/oim.c b/libpurple/protocols/msn/oim.c
--- a/libpurple/protocols/msn/oim.c
+++ b/libpurple/protocols/msn/oim.c
@@ -660,7 +660,7 @@
 		charset = msn_message_get_charset(message);
 	}
 
-	if (charset && !((strncasecmp(charset, "UTF-8", 5) == 0) || (strncasecmp(charset, "UTF8", 4) == 0))) {
+	if (charset && !((g_ascii_strncasecmp(charset, "UTF-8", 5) == 0) || (g_ascii_strncasecmp(charset, "UTF8", 4) == 0))) {
 		clean_msg = g_convert(decode_msg, body_len, "UTF-8", charset, NULL, NULL, NULL);
 
 		if (!clean_msg) {
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -371,7 +371,7 @@
 	int					start;
 	unsigned int		end;
 	int					emo_ofs;
-	char				ii[128];
+	char*				ii;
 	char				tag[64];
 	int*				img_id;
 
@@ -389,8 +389,7 @@
 			if ( end == mx->msg->len )			/* end of emoticon tag not found */
 				break;
 
-			memset( ii, 0x00, sizeof( ii ) );
-			memcpy( ii, &mx->msg->str[emo_ofs], end - emo_ofs );
+			ii = g_strndup(&mx->msg->str[emo_ofs], end - emo_ofs);
 
 			/* remove inline image tag */
 			g_string_erase( mx->msg, start, ( end - start ) + 1 );
@@ -408,6 +407,8 @@
 				            *img_id );
 				g_string_insert( mx->msg, start, tag );
 			}
+
+			g_free(ii);
 		}
 	}
 
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -344,9 +344,11 @@
 		(dialog->prpl_info->options & OPT_PROTO_REGISTER_NOSCREENNAME));
 	int register_noscreenname = (opt_noscreenname && register_checked);
 	
+	// get rid of login_label in username field
+	username_focus_cb(dialog->username_entry, NULL, dialog);
+	
 	if (register_noscreenname) {
 		gtk_entry_set_text(GTK_ENTRY(dialog->username_entry), "");
-		username_nofocus_cb(dialog->username_entry, NULL, dialog);
 		gtk_entry_set_text(GTK_ENTRY(dialog->password_entry), "");
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->remember_pass_check), FALSE);
 	}
@@ -360,6 +362,8 @@
 			*gtk_entry_get_text(GTK_ENTRY(dialog->username_entry))
 				!= '\0');
 	}
+	
+	username_nofocus_cb(dialog->username_entry, NULL, dialog);
 }
 
 static void
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1978,10 +1978,6 @@
 			pidgin_retrieve_user_info(purple_account_get_connection(purple_buddy_get_account(b)), purple_buddy_get_name(b));
 		handled = TRUE;
 	}
-	else if ((event->button == 1) && (event->type == GDK_2BUTTON_PRESS) &&
-	((PURPLE_BLIST_NODE_IS_CONTACT(node)) || (PURPLE_BLIST_NODE_IS_BUDDY(node)))) {
-               handled = TRUE;
-	}
 
 #if (1)
 	/*
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -1217,9 +1217,9 @@
 
 	purple_prpl_initiate_media(account,
 			purple_conversation_get_name(conv),
-			action == win->audio_call ? PURPLE_MEDIA_AUDIO :
-			action == win->video_call ? PURPLE_MEDIA_VIDEO :
-			action == win->audio_video_call ? PURPLE_MEDIA_AUDIO |
+			action == win->menu.audio_call ? PURPLE_MEDIA_AUDIO :
+			action == win->menu.video_call ? PURPLE_MEDIA_VIDEO :
+			action == win->menu.audio_video_call ? PURPLE_MEDIA_AUDIO |
 			PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE);
 }
 #endif
@@ -3362,25 +3362,25 @@
 				purple_prpl_get_media_caps(account,
 				purple_conversation_get_name(conv));
 
-		gtk_action_set_sensitive(win->audio_call,
+		gtk_action_set_sensitive(win->menu.audio_call,
 				caps & PURPLE_MEDIA_CAPS_AUDIO
 				? TRUE : FALSE);
-		gtk_action_set_sensitive(win->video_call,
+		gtk_action_set_sensitive(win->menu.video_call,
 				caps & PURPLE_MEDIA_CAPS_VIDEO
 				? TRUE : FALSE);
-		gtk_action_set_sensitive(win->audio_video_call,
+		gtk_action_set_sensitive(win->menu.audio_video_call,
 				caps & PURPLE_MEDIA_CAPS_AUDIO_VIDEO
 				? TRUE : FALSE);
 	} else if (purple_conversation_get_type(conv)
 			== PURPLE_CONV_TYPE_CHAT) {
 		/* for now, don't care about chats... */
-		gtk_action_set_sensitive(win->audio_call, FALSE);
-		gtk_action_set_sensitive(win->video_call, FALSE);
-		gtk_action_set_sensitive(win->audio_video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_call, FALSE);
+		gtk_action_set_sensitive(win->menu.video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_video_call, FALSE);
 	} else {
-		gtk_action_set_sensitive(win->audio_call, FALSE);
-		gtk_action_set_sensitive(win->video_call, FALSE);
-		gtk_action_set_sensitive(win->audio_video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_call, FALSE);
+		gtk_action_set_sensitive(win->menu.video_call, FALSE);
+		gtk_action_set_sensitive(win->menu.audio_video_call, FALSE);
 	}
 #endif
 }
@@ -3608,13 +3608,13 @@
 		                          "/Conversation/ConversationMenu/ViewLog");
 
 #ifdef USE_VV
-	win->audio_call =
+	win->menu.audio_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/AudioCall");
-	win->video_call =
+	win->menu.video_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/VideoCall");
-	win->audio_video_call =
+	win->menu.audio_video_call =
 		gtk_ui_manager_get_action(win->menu.ui,
 					    "/Conversation/ConversationMenu/MediaMenu/AudioVideoCall");
 #endif
@@ -8120,7 +8120,7 @@
 				purple_conversation_get_account(conv) == account) {
 			purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
 			purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
-						"longer in this chat. You will be automatically rejoined in the chat when "
+						"longer in this chat. You will automatically rejoin the chat when "



More information about the Commits mailing list