/pidgin/main: 3fc59f06fea4: Merged in rw_grim/pidgin (pull reque...

Gary Kramlich grim at reaperworld.com
Fri May 6 00:13:57 EDT 2016


Changeset: 3fc59f06fea44b09af83c99f27a10445ffaf32ec
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2016-05-05 23:13 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/3fc59f06fea4

Description:

Merged in rw_grim/pidgin (pull request #45)

scan build fixes

diffstat:

 libpurple/protocols/gg/lib/dcc7.c             |  3 +++
 libpurple/protocols/jabber/jabber.c           |  7 +++++--
 libpurple/protocols/jabber/jingle/transport.c |  4 ++--
 libpurple/tls-certificate-info.c              |  4 +++-
 pidgin/gtkcertmgr.c                           |  2 +-
 5 files changed, 14 insertions(+), 6 deletions(-)

diffs (102 lines):

diff --git a/libpurple/protocols/gg/lib/dcc7.c b/libpurple/protocols/gg/lib/dcc7.c
--- a/libpurple/protocols/gg/lib/dcc7.c
+++ b/libpurple/protocols/gg/lib/dcc7.c
@@ -333,6 +333,9 @@ static int gg_dcc7_reverse_connect(struc
 {
 	gg_debug_dcc(dcc, GG_DEBUG_FUNCTION, "** gg_dcc7_reverse_connect(%p)\n", dcc);
 
+	if (dcc == NULL)
+		return -1;
+
 	if (dcc->reverse) {
 		gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_reverse_connect() already reverse connection\n");
 		return -1;
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -220,12 +220,13 @@ static char *jabber_prep_resource(char *
 static gboolean
 jabber_process_starttls(JabberStream *js, PurpleXmlNode *packet)
 {
+	PurpleXmlNode *starttls;
+
+#if 0
 	PurpleAccount *account;
-	PurpleXmlNode *starttls;
 
 	account = purple_connection_get_account(js->gc);
 
-#if 0
 	/*
 	 * This code DOES NOT EXIST, will never be enabled by default, and
 	 * will never ever be supported (by me).
@@ -245,6 +246,7 @@ jabber_process_starttls(JabberStream *js
 	return TRUE;
 #endif
 
+#if 0
 	starttls = purple_xmlnode_get_child(packet, "starttls");
 	if(purple_xmlnode_get_child(starttls, "required")) {
 		purple_connection_error(js->gc,
@@ -261,6 +263,7 @@ jabber_process_starttls(JabberStream *js
 	}
 
 	return FALSE;
+#endif
 }
 
 void jabber_stream_features_parse(JabberStream *js, PurpleXmlNode *packet)
diff --git a/libpurple/protocols/jabber/jingle/transport.c b/libpurple/protocols/jabber/jingle/transport.c
--- a/libpurple/protocols/jabber/jingle/transport.c
+++ b/libpurple/protocols/jabber/jingle/transport.c
@@ -91,7 +91,7 @@ jingle_transport_finalize (GObject *tran
 static void
 jingle_transport_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
-	g_return_if_fail(object != NULL);
+	g_return_if_fail(G_IS_OBJECT(object));
 	g_return_if_fail(JINGLE_IS_TRANSPORT(object));
 
 	switch (prop_id) {
@@ -104,7 +104,7 @@ jingle_transport_set_property (GObject *
 static void
 jingle_transport_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 {
-	g_return_if_fail(object != NULL);
+	g_return_if_fail(G_IS_OBJECT(object));
 	g_return_if_fail(JINGLE_IS_TRANSPORT(object));
 
 	switch (prop_id) {
diff --git a/libpurple/tls-certificate-info.c b/libpurple/tls-certificate-info.c
--- a/libpurple/tls-certificate-info.c
+++ b/libpurple/tls-certificate-info.c
@@ -302,7 +302,7 @@ der_parse_name(DerNodeData *name_node)
 {
 	GSList *list;
 	GSList *ret = NULL;
-	DerOIDValue *value;
+	DerOIDValue *value = NULL;
 
 	g_return_val_if_fail(name_node != NULL, NULL);
 
@@ -382,6 +382,8 @@ der_parse_time(DerNodeData *node)
 	g_return_val_if_fail(node != NULL, NULL);
 	g_return_val_if_fail(node->content != NULL, NULL);
 
+	memset(time_parts, 0, sizeof(gint) * sizeof(time_parts));
+
 	time = der_parse_string(node);
 
 	/* For the purposes of X.509
diff --git a/pidgin/gtkcertmgr.c b/pidgin/gtkcertmgr.c
--- a/pidgin/gtkcertmgr.c
+++ b/pidgin/gtkcertmgr.c
@@ -336,7 +336,7 @@ tls_peers_mgmt_info_cb(GtkWidget *button
 	if (crt == NULL) {
 		purple_debug_warning("gtkcertmgr/tls_peers_mgmt",
 				"Unable to fetch certificate '%s': %s",
-				id, error->message);
+				id, error ? error->message : "unknown error");
 		g_clear_error(&error);
 		g_free(id);
 	}



More information about the Commits mailing list