]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
The call_token on the pvt can occasionally be NULL, causing a crash.
authorJason Parker <jparker@digium.com>
Mon, 14 Apr 2008 18:31:57 +0000 (18:31 +0000)
committerJason Parker <jparker@digium.com>
Mon, 14 Apr 2008 18:31:57 +0000 (18:31 +0000)
If it is NULL, we can skip this channel, since it can't the one we're looking for.

(closes issue #9299)
Reported by: vazir

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

channels/chan_h323.c

index 57dbf80652e04a005f6aa70a0f32aca3c3dd5696..3ae30087635e90b3100d6d44321601159da9d3ab 100644 (file)
@@ -1149,7 +1149,7 @@ static struct oh323_pvt *find_call_locked(int call_reference, const char *token)
        while(pvt) {
                if (!pvt->needdestroy && ((signed int)pvt->cd.call_reference == call_reference)) {
                        /* Found the call */
-                       if ((token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
+                       if ((token != NULL) && (pvt->cd.call_token != NULL) && (!strcmp(pvt->cd.call_token, token))) {
                                ast_mutex_lock(&pvt->lock);
                                ast_mutex_unlock(&iflock);
                                return pvt;