diff libpurple/protocols/yahoo/libymsg.c @ 31823:d72d728226dc

propagate from branch 'im.pidgin.pidgin' (head fb4d2b014576462db99d919dea15fbed03f1f48a) to branch 'im.pidgin.pidgin.next.minor' (head 4a5878f91c824f207ed343b57b36ae74e1baa438)
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 13 Mar 2011 18:14:04 +0000
parents ea2a155b4439 d88f3153170b
children 7281d151e492 ac3867fbd61f
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Mon Feb 21 23:08:47 2011 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Sun Mar 13 18:14:04 2011 +0000
@@ -842,7 +842,7 @@
 				break;
 		}
 
-		if (*stat == '1')
+		if (stat && *stat == '1')
 			serv_got_typing(gc, fed_from, 0, PURPLE_TYPING);
 		else
 			serv_got_typing_stopped(gc, fed_from);
@@ -864,7 +864,7 @@
 
 		yahoo_friend_set_game(f, NULL);
 
-		if (*stat == '1') {
+		if (stat && *stat == '1') {
 			yahoo_friend_set_game(f, game);
 			if (bud)
 				yahoo_update_status(gc, from, f);
@@ -922,6 +922,11 @@
 		l = l->next;
 	}
 
+	if(!sms) {
+		purple_debug_info("yahoo", "Received a malformed SMS packet!\n");
+		return;
+	}
+
 	if( (pkt->status == -1) || (pkt->status == YAHOO_STATUS_DISCONNECTED) ) {
 		if (server_msg) {
 			PurpleConversation *c;