[asterisk-commits] mnicholson: branch 1.4 r213339 - /branches/1.4/res/res_features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 20 15:33:12 CDT 2009


Author: mnicholson
Date: Thu Aug 20 15:33:07 2009
New Revision: 213339

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213339
Log:
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)

Modified:
    branches/1.4/res/res_features.c

Modified: branches/1.4/res/res_features.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=213339&r1=213338&r2=213339
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Thu Aug 20 15:33:07 2009
@@ -1777,7 +1777,7 @@
 		   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) {




More information about the asterisk-commits mailing list