diff libpurple/protocols/oscar/family_icbm.c @ 29984:6d96bfe048bc

If we get an error SNAC on the ICBM family and it's missing buddy name then don't fallthrough to the default error handler in misc.c. This was causing purple_parse_msgerr() in oscar.c to get called with different va_args than it was expecting, which caused a crash. Specifically when trying to fetch the ICQ x-status of an offline buddy. Fixes #11863. This is nosnilmot's patch, I believe. I had no part in it, other than verifying that I do believe it'll fix the crash.
author Mark Doliner <mark@kingant.net>
date Thu, 20 May 2010 01:39:25 +0000
parents 815bd8b41638
children c1b8e619f1b8
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_icbm.c	Thu May 20 01:27:23 2010 +0000
+++ b/libpurple/protocols/oscar/family_icbm.c	Thu May 20 01:39:25 2010 +0000
@@ -166,20 +166,20 @@
 
 	if (!(snac2 = aim_remsnac(od, snac->id))) {
 		purple_debug_misc("oscar", "icbm error: received response from unknown request!\n");
-		return 0;
+		return 1;
 	}
 
 	if (snac2->family != SNAC_FAMILY_ICBM) {
 		purple_debug_misc("oscar", "icbm error: received response from invalid request! %d\n", snac2->family);
 		g_free(snac2->data);
 		g_free(snac2);
-		return 0;
+		return 1;
 	}
 
 	if (!(bn = snac2->data)) {
 		purple_debug_misc("oscar", "icbm error: received response from request without a buddy name!\n");
 		g_free(snac2);
-		return 0;
+		return 1;
 	}
 
 	reason = byte_stream_get16(bs);