From: Matthew Nicholson Date: Thu, 20 Aug 2009 20:33:07 +0000 (+0000) Subject: Fix a crash by checking the proper pointer for validity before deferencing it. X-Git-Tag: 1.4.26.2~4^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fa5fa014f9301f971fa9202cebf18eb8e0ecec0;p=thirdparty%2Fasterisk.git Fix a crash by checking the proper pointer for validity before deferencing it. (closes issue #15751) Reported by: atis Patches: ast_bridge_call_peer_cdr.patch uploaded by atis (license 242) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213339 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 1813268fd0..7d619c86b0 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1777,7 +1777,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast is before the bridge's start time, so I added in the tvcmp check to the if below */ - if (peer_cdr && !ast_tvzero(peer_cdr->answer) && ast_tvcmp(peer->cdr->answer, bridge_cdr->start) >= 0) { + if (peer_cdr && !ast_tvzero(peer_cdr->answer) && ast_tvcmp(peer_cdr->answer, bridge_cdr->start) >= 0) { ast_cdr_setanswer(bridge_cdr, peer_cdr->answer); ast_cdr_setdisposition(bridge_cdr, peer_cdr->disposition); if (chan_cdr) {