libpurple/protocols/msn/slp.c

changeset 30857
1a7e2da2ab01
parent 30706
612b36b49058
child 31083
41dbf303d766
--- a/libpurple/protocols/msn/slp.c	Sun Oct 17 03:40:26 2010 +0000
+++ b/libpurple/protocols/msn/slp.c	Sun Oct 17 03:55:04 2010 +0000
@@ -554,7 +554,7 @@
 							 slpcall->slplink->remote_user);
 
 		header = (MsnFileContext *)purple_base64_decode(context, &bin_len);
-		if (bin_len >= sizeof(MsnFileContext) - 1 &&
+		if (header != NULL && bin_len >= sizeof(MsnFileContext) - 1 &&
 			(header->version == 2 ||
 			 (header->version == 3 && header->length == sizeof(MsnFileContext) + 63))) {
 			file_size = GUINT64_FROM_LE(header->file_size);

mercurial