Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/notification.c @ 23557: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 | 5c95339855b2 |
children | 7e16d193bb57 |
comparison
equal
deleted
inserted
replaced
23556:7fc1fa02184a | 23557:f1ff35d14a95 |
---|---|
326 **************************************************************************/ | 326 **************************************************************************/ |
327 | 327 |
328 static void | 328 static void |
329 out_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 329 out_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
330 { | 330 { |
331 if (!g_ascii_strcasecmp(cmd->params[0], "OTH")) | 331 if (cmd->param_count == 0) |
332 msn_session_set_error(cmdproc->session, -1, NULL); | |
333 else if (!g_ascii_strcasecmp(cmd->params[0], "OTH")) | |
332 msn_session_set_error(cmdproc->session, MSN_ERROR_SIGN_OTHER, | 334 msn_session_set_error(cmdproc->session, MSN_ERROR_SIGN_OTHER, |
333 NULL); | 335 NULL); |
334 else if (!g_ascii_strcasecmp(cmd->params[0], "SSD")) | 336 else if (!g_ascii_strcasecmp(cmd->params[0], "SSD")) |
335 msn_session_set_error(cmdproc->session, MSN_ERROR_SERV_DOWN, NULL); | 337 msn_session_set_error(cmdproc->session, MSN_ERROR_SERV_DOWN, NULL); |
336 } | 338 } |