From 6e6d6f2e103e377e25eb96b2402a3f8c75daddbc Mon Sep 17 00:00:00 2001 From: Jason Parker <jparker@digium.com> Date: Mon, 14 Apr 2008 18:34:17 +0000 Subject: [PATCH] Merged revisions 114120 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114120 | qwell | 2008-04-14 13:31:57 -0500 (Mon, 14 Apr 2008) | 7 lines The call_token on the pvt can occasionally be NULL, causing a crash. 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/trunk@114121 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_h323.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 140c06fa37..a3f6ee6f31 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -1148,7 +1148,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; -- GitLab