Merged revisions 67021 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 4 Jun 2007 15:53:15 +0000 (15:53 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 4 Jun 2007 15:53:15 +0000 (15:53 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67021 | tilghman | 2007-06-04 10:50:16 -0500 (Mon, 04 Jun 2007) | 2 lines

Issue 9739 - Malformed jid causes a crash

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67023 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_jabber.c

index 79731dc..5b88bf7 100644 (file)
@@ -546,6 +546,10 @@ static int aji_act_hook(void *data, int type, iks *node)
                                                                }
                                                        }
                                                } else {
+                                                       if (!client->jid->user) {
+                                                               ast_log(LOG_ERROR, "Malformed Jabber ID : %s (domain missing?)\n", client->jid->full);
+                                                               break;
+                                                       }
                                                        features = aji_highest_bit(features);
                                                        if (features == IKS_STREAM_SASL_MD5)
                                                                iks_start_sasl(client->p, IKS_SASL_DIGEST_MD5, client->jid->user, client->password);