[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pidgin-commits
Subject:    /pidgin/main: 80d13da6d42f: Prevent a null pointer dereference. ...
From:       Michael McConville <mmcconville () mykolab ! com>
Date:       2015-09-02 18:57:24
Message-ID: hg.80d13da6d42f.1441220244.-874508059 () rock ! pidgin ! im
[Download RAW message or body]

Changeset: 80d13da6d42f525f7cc9622afd1b14d4353cc060
Author:	 Michael McConville <mmcconville@mykolab.com>
Date:	 2015-09-02 14:56 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/80d13da6d42f

Description:

Prevent a null pointer dereference. Found with the Clang static analyzer.

diffstat:

 libpurple/protocols/jabber/presence.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/libpurple/protocols/jabber/presence.c b/libpurple/protocols/jabber/presence.c
--- a/libpurple/protocols/jabber/presence.c
+++ b/libpurple/protocols/jabber/presence.c
@@ -334,7 +334,7 @@ PurpleXmlNode *jabber_presence_create_js
 	}
 
 	/* if we are idle and not offline, include idle */
-	if (js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) {
+	if (js && js->idle && state != JABBER_BUDDY_STATE_UNAVAILABLE) {
 		PurpleXmlNode *query = purple_xmlnode_new_child(presence, "query");
 		gchar seconds[10];
 		g_snprintf(seconds, 10, "%d", (int) (time(NULL) - js->idle));

_______________________________________________
Commits mailing list
Commits@pidgin.im
https://pidgin.im/cgi-bin/mailman/listinfo/commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic