]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 213327 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 20 Aug 2009 20:37:43 +0000 (20:37 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 20 Aug 2009 20:37:43 +0000 (20:37 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r213327 | mnicholson | 2009-08-20 15:29:32 -0500 (Thu, 20 Aug 2009) | 7 lines

  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.6.1@213349 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index 5ed83b68f0ff8b00563c9ab91fa165f1d49c05aa..a0bb928321d39c2c386ac27515f8c5d696b17830 100644 (file)
@@ -2510,7 +2510,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) {
                        bridge_cdr->answer = peer_cdr->answer;
                        bridge_cdr->disposition = peer_cdr->disposition;
                        if (chan_cdr) {