From ea1307d9ad225ff3fdf95280d4c9a23e58aebb21 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 13 Jul 2010 16:53:44 +0000 Subject: Merged revisions 275994 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r275994 | russell | 2010-07-13 11:51:18 -0500 (Tue, 13 Jul 2010) | 14 lines Access peer->cdr directly instead of through a saved off reference. At this point in the code, it is possible that peer_cdr may be invalid. Specifically, in the blind transfer code, CDRs are swapped between channels. So, peer_cdr is no longer == peer->cdr. The scenario that exposed a crash in this code was a blind transfer that hit the system call limit, causing the transferee channel to get destroyed after the transfer attempt failed. Even if it succeeds and this code doesn't crash, this code was still trying to reset a CDR on a channel that was now owned by a different thread, which is a BadThing(tm). (ABE-2417) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275995 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/features.c') diff --git a/main/features.c b/main/features.c index 798e86111..32b311278 100644 --- a/main/features.c +++ b/main/features.c @@ -3451,7 +3451,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast /* new channel */ ast_cdr_specialized_reset(new_chan_cdr, 0); } else { - ast_cdr_specialized_reset(chan_cdr, 0); /* nothing changed, reset the chan_cdr */ + ast_cdr_specialized_reset(chan->cdr, 0); /* nothing changed, reset the chan cdr */ } } -- cgit v1.2.3