/pidgin/main: ef836278304b: msn: Fix NUL-pointer deref issue par...

Daniel Atallah datallah at pidgin.im
Tue Jan 28 10:38:08 EST 2014


Changeset: ef836278304b144c64b63181892129b84392fc4c
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2013-03-16 14:17 -0400
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/ef836278304b

Description:

msn: Fix NUL-pointer deref issue parsing mail notifications

 * Thanks to Fabian Yamaguchi and Christian Wressnegger of the University of Goettingen

diffstat:

 libpurple/protocols/msn/oim.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (16 lines):

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
@@ -824,10 +824,10 @@ msn_parse_oim_xml(MsnOim *oim, xmlnode *
 		char *unread = xmlnode_get_data(iu_node);
 		const char *passports[2] = { msn_user_get_passport(session->user) };
 		const char *urls[2] = { session->passport_info.mail_url };
-		int count = atoi(unread);
+		int count;
 
 		/* XXX/khc: pretty sure this is wrong */
-		if (count > 0)
+		if (unread && (count = atoi(unread)) > 0)
 			purple_notify_emails(session->account->gc, count, FALSE, NULL,
 				NULL, passports, urls, NULL, NULL);
 		g_free(unread);



More information about the Commits mailing list