diff libpurple/protocols/msn/notification.c @ 20836:d1e3e1bbb242

Don't assume that the payload is nul delimited.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 09 Oct 2007 00:38:12 +0000
parents 58ce69a8582d
children a3be7b2e335c
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Tue Oct 09 00:25:56 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Tue Oct 09 00:38:12 2007 +0000
@@ -450,7 +450,7 @@
 	const char *passport;
 	const char *content_type;
 
-	purple_debug_info("MSNP14","Process UBM payload:%s\n",payload);
+	purple_debug_info("MSNP14","Process UBM payload:%.*s\n", len, payload);
 	msg = msn_message_new_from_cmd(cmdproc->session, cmd);
 
 	msn_message_parse_payload(msg, payload, len,MSG_LINE_DEM,MSG_BODY_DEM);
@@ -533,7 +533,7 @@
 	}else{
 		g_return_if_fail(cmd->payload_cb != NULL);
 
-		purple_debug_info("MSNP14","UBM payload:{%s}\n",cmd->payload);
+		purple_debug_info("MSNP14","UBM payload:{%.*s}\n", cmd->payload_len, cmd->payload);
 		ubm_cmd_post(cmdproc, cmd, cmd->payload, cmd->payload_len);
 	}
 }