/pidgin/main: 0efbeb2be432: some more scan build fixes

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


Changeset: 0efbeb2be4327b9dd0b80b55248dfd4780597e88
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2016-05-02 23:16 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/0efbeb2be432

Description:

some more scan build fixes

diffstat:

 libpurple/protocols/gg/lib/dcc7.c   |  5 ++++-
 libpurple/protocols/jabber/jabber.c |  2 ++
 libpurple/tls-certificate-info.c    |  4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diffs (55 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,7 +333,10 @@ static int gg_dcc7_reverse_connect(struc
 {
 	gg_debug_dcc(dcc, GG_DEBUG_FUNCTION, "** gg_dcc7_reverse_connect(%p)\n", dcc);
 
-	if (dcc && dcc->reverse) {
+	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
@@ -246,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,
@@ -262,6 +263,7 @@ jabber_process_starttls(JabberStream *js
 	}
 
 	return FALSE;
+#endif
 }
 
 void jabber_stream_features_parse(JabberStream *js, PurpleXmlNode *packet)
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



More information about the Commits mailing list