[asterisk-commits] file: branch 1.4 r66768 - in /branches/1.4: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 31 09:14:49 MST 2007


Author: file
Date: Thu May 31 11:14:48 2007
New Revision: 66768

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66768
Log:
Merged revisions 66764 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r66764 | file | 2007-05-31 12:12:39 -0400 (Thu, 31 May 2007) | 2 lines

It is now possible for this path of execution to have the frame pointer be NULL, therefore we need to check for it before trying to access it. (issue #9836 reported by barthpbx)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=66768&r1=66767&r2=66768
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu May 31 11:14:48 2007
@@ -4132,10 +4132,10 @@
 		return &ast_null_frame;
 
 		/* We already hold the channel lock */
-	if (!p->owner || f->frametype != AST_FRAME_VOICE)
+	if (!p->owner || (f && f->frametype != AST_FRAME_VOICE))
 		return f;
 
-	if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+	if (f && f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
 		if (!(f->subclass & p->jointcapability)) {
 			if (option_debug) {
 				ast_log(LOG_DEBUG, "Bogus frame of format '%s' received from '%s'!\n",
@@ -4150,7 +4150,7 @@
 		ast_set_write_format(p->owner, p->owner->writeformat);
 	}
 
-	if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
+	if (f && (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
 		f = ast_dsp_process(p->owner, p->vad, f);
 		if (f && f->frametype == AST_FRAME_DTMF) {
 			if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT_UDPTL) && f->subclass == 'f') {



More information about the asterisk-commits mailing list