changeset 23338:c80746c7c96c

* Avoid called g_markup_escape_text() on a NULL message * If we get a NULL message and a non-NULL itms URL, pass "" for the message. Otherwise, the variable arguments will end at the message, and the itmsurl won't be seen.
author Evan Schoenberg <evan.s@dreskin.net>
date Mon, 09 Jun 2008 18:43:11 +0000
parents 96dd27f5b45b
children 6933bd0415a1
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Mon Jun 09 18:04:13 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon Jun 09 18:43:11 2008 +0000
@@ -1963,7 +1963,11 @@
 			itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding,
 					info->itmsurl, info->itmsurl_len);
 
-		tmp = g_markup_escape_text(message, -1);
+		tmp = (message ? g_markup_escape_text(message, -1) : NULL);
+
+		if (message == NULL && itmsurl != NULL)
+			message = "";
+
 		purple_prpl_got_user_status(account, info->sn, status_id,
 				"message", tmp, "itmsurl", itmsurl, NULL);
 		g_free(tmp);