/pidgin/main: d603bfb42fd9: Fix some coverity CWE-484 issues

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 30 18:15:05 EDT 2014


Changeset: d603bfb42fd9cbe3693434bd5653804914f1709e
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-01 00:14 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/d603bfb42fd9

Description:

Fix some coverity CWE-484 issues

diffstat:

 finch/gntdebug.c                        |  1 +
 libpurple/plugins/tcl/tcl_signals.c     |  1 +
 libpurple/protocols/sametime/sametime.c |  1 +
 libpurple/protocols/zephyr/zephyr.c     |  2 ++
 libpurple/util.c                        |  4 +++-
 5 files changed, 8 insertions(+), 1 deletions(-)

diffs (70 lines):

diff --git a/finch/gntdebug.c b/finch/gntdebug.c
--- a/finch/gntdebug.c
+++ b/finch/gntdebug.c
@@ -135,6 +135,7 @@ finch_debug_print(PurpleDebugLevel level
 		{
 			case PURPLE_DEBUG_WARNING:
 				flag |= GNT_TEXT_FLAG_UNDERLINE;
+				/* fall through */
 			case PURPLE_DEBUG_ERROR:
 			case PURPLE_DEBUG_FATAL:
 				flag |= GNT_TEXT_FLAG_BOLD;
diff --git a/libpurple/plugins/tcl/tcl_signals.c b/libpurple/plugins/tcl/tcl_signals.c
--- a/libpurple/plugins/tcl/tcl_signals.c
+++ b/libpurple/plugins/tcl/tcl_signals.c
@@ -274,6 +274,7 @@ static void *tcl_signal_callback(va_list
 			switch (purple_value_get_subtype(handler->argtypes[i])) {
 			case PURPLE_SUBTYPE_UNKNOWN:
 				purple_debug(PURPLE_DEBUG_ERROR, "tcl", "subtype unknown\n");
+				/* fall through */
 			case PURPLE_SUBTYPE_ACCOUNT:
 			case PURPLE_SUBTYPE_CONNECTION:
 			case PURPLE_SUBTYPE_CONVERSATION:
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -1563,6 +1563,7 @@ static void mw_session_stateChange(struc
   case mwSession_LOGIN_CONT:
     msg = _("Forcing Login");
     purple_connection_update_progress(gc, msg, 7, MW_CONNECT_STEPS);
+    break;
 
   case mwSession_LOGIN_ACK:
     msg = _("Login Acknowledged");
diff --git a/libpurple/protocols/zephyr/zephyr.c b/libpurple/protocols/zephyr/zephyr.c
--- a/libpurple/protocols/zephyr/zephyr.c
+++ b/libpurple/protocols/zephyr/zephyr.c
@@ -1240,6 +1240,8 @@ static gint check_notify_zeph02(gpointer
 			break;
 		case CLIENTACK:
 			purple_debug_error("zephyr", "Client ack received\n");
+			handle_unknown(notice); /* XXX: is it really unknown? */
+			break;
 		default:
 			/* we'll just ignore things for now */
 			handle_unknown(notice);
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -1157,6 +1157,7 @@ purple_markup_find_tag(const char *needl
 				case '"':
 				case '\'':
 					in_quotes = close;
+					/* fall through */
 				case '=':
 					{
 						size_t len = close - cur;
@@ -1169,11 +1170,12 @@ purple_markup_find_tag(const char *needl
 
 						in_attr = FALSE;
 						cur = close + 1;
-						break;
 					}
+					break;
 				case ' ':
 				case '>':
 					in_attr = FALSE;
+					/* fall through */
 				default:
 					cur = close;
 					break;



More information about the Commits mailing list