From 844903bf649ddf67e065b0e64f9b14e23ab9d7e2 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Mon, 6 Dec 2010 14:49:16 +0000 Subject: server-sasl-handler: handle invalid SASL statuses Signed-off-by: Jonny Lamb --- libempathy/empathy-server-sasl-handler.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-server-sasl-handler.c b/libempathy/empathy-server-sasl-handler.c index d9f504942..4b5a44193 100644 --- a/libempathy/empathy-server-sasl-handler.c +++ b/libempathy/empathy-server-sasl-handler.c @@ -79,6 +79,13 @@ sasl_status_changed_cb (TpChannel *channel, { EmpathyServerSASLHandlerPriv *priv = GET_PRIV (weak_object); + /* buh boh */ + if (status >= G_N_ELEMENTS (sasl_statuses)) + { + DEBUG ("SASL status changed to unknown status"); + return; + } + DEBUG ("SASL status changed to '%s'", sasl_statuses[status]); if (status == TP_SASL_STATUS_SERVER_SUCCEEDED) -- cgit v1.2.3