/pidgin/main: e111ec8dcb3f: Yahoo: fix potential NULL pointer de...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue Jan 28 10:38:09 EST 2014


Changeset: e111ec8dcb3f4b1b3af1f1bb9cb43ebbe2875a8d
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-07-05 12:14 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/e111ec8dcb3f

Description:

Yahoo: fix potential NULL pointer dereference

diffstat:

 libpurple/protocols/yahoo/libymsg.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -1717,6 +1717,8 @@ static void yahoo_auth16_stage3(PurpleCo
 
 	purple_debug_info("yahoo","Authentication: In yahoo_auth16_stage3\n");
 
+	g_return_if_fail(crypt != NULL);
+
 	md5_cipher = purple_ciphers_find_cipher("md5");
 	md5_ctx = purple_cipher_context_new(md5_cipher, NULL);
 	purple_cipher_context_append(md5_ctx, (guchar *)crypt, strlen(crypt));
@@ -1858,6 +1860,9 @@ static void yahoo_auth16_stage2(PurpleUt
 		g_strfreev(splits);
 		g_strfreev(split_data);
 
+		if (crumb == NULL)
+			response_no = -1;
+
 		if(response_no != 0) {
 			/* Some error in the login process */
 			PurpleConnectionError error;



More information about the Commits mailing list