]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 55799 via svnmerge from
authorJason Parker <jparker@digium.com>
Wed, 21 Feb 2007 02:04:10 +0000 (02:04 +0000)
committerJason Parker <jparker@digium.com>
Wed, 21 Feb 2007 02:04:10 +0000 (02:04 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55799 | qwell | 2007-02-20 20:01:36 -0600 (Tue, 20 Feb 2007) | 4 lines

Fix segfault when buddy couldn't be found.

Issue 7764, patch by sailer

........

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

channels/chan_gtalk.c
channels/chan_jingle.c

index ad335d2f96b50e2049ef2f9d4a94b4d99192e481..76e1399de8ae3bf92a7c06813449572592ef3e82 100644 (file)
@@ -838,7 +838,7 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const
                        buddy = ASTOBJ_CONTAINER_FIND(&client->connection->buddies, them);
                        if (buddy)
                                resources = buddy->resources;
-               } else 
+               } else if (client->buddy)
                        resources = client->buddy->resources;
                while (resources) {
                        if (resources->cap->jingle) {
index 26980640b2e6524ce9b2ff4bee33b97cee336851..50f11538da906801b24a5ed67750feda926364eb 100644 (file)
@@ -707,7 +707,7 @@ static struct jingle_pvt *jingle_alloc(struct jingle *client, const char *from,
                        buddy = ASTOBJ_CONTAINER_FIND(&client->connection->buddies, from);
                        if (buddy)
                                resources = buddy->resources;
-               } else 
+               } else if (client->buddy)
                        resources = client->buddy->resources;
                while (resources) {
                        if (resources->cap->jingle) {