]> git.0d.be Git - empathy.git/commitdiff
server-sasl-handler: handle invalid SASL statuses
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Mon, 6 Dec 2010 14:49:16 +0000 (14:49 +0000)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Mon, 6 Dec 2010 14:49:16 +0000 (14:49 +0000)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
libempathy/empathy-server-sasl-handler.c

index d9f5049422ba1eff3d58d86b7eb7c7ea565e3713..4b5a44193054922f9fb1a85b8f2649d1bf2a6a43 100644 (file)
@@ -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)