changeset 23512:f1ff35d14a95

When receiving an MSN OUT, don't try to dereference cmd->params when cmd->param_count is zero. References #4332.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 29 Jun 2008 20:01:14 +0000
parents 7fc1fa02184a
children cab5420c3879
files libpurple/protocols/msn/notification.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Sun Jun 29 19:17:26 2008 +0000
+++ b/libpurple/protocols/msn/notification.c	Sun Jun 29 20:01:14 2008 +0000
@@ -328,7 +328,9 @@
 static void
 out_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	if (!g_ascii_strcasecmp(cmd->params[0], "OTH"))
+	if (cmd->param_count == 0)
+		msn_session_set_error(cmdproc->session, -1, NULL);
+	else if (!g_ascii_strcasecmp(cmd->params[0], "OTH"))
 		msn_session_set_error(cmdproc->session, MSN_ERROR_SIGN_OTHER,
 							  NULL);
 	else if (!g_ascii_strcasecmp(cmd->params[0], "SSD"))