[asterisk-commits] irroot: branch irroot/t38gateway-1.8 r319357 - /team/irroot/t38gateway-1.8/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 17 01:12:08 CDT 2011


Author: irroot
Date: Tue May 17 01:12:02 2011
New Revision: 319357

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319357
Log:

Check for null data in frames when processing packets

Issue: #13405
Reporter: sles


Modified:
    team/irroot/t38gateway-1.8/res/res_fax_spandsp.c

Modified: team/irroot/t38gateway-1.8/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax_spandsp.c?view=diff&rev=319357&r1=319356&r2=319357
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax_spandsp.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax_spandsp.c Tue May 17 01:12:02 2011
@@ -718,10 +718,10 @@
 	struct spandsp_pvt *p = s->tech_pvt;
 
 	/* Process a IFP packet */
-	if ((f->frametype == AST_FRAME_MODEM) && (f->subclass.codec == AST_MODEM_T38)) {
+	if (f->data.ptr && (f->frametype == AST_FRAME_MODEM) && (f->subclass.codec == AST_MODEM_T38)) {
 		t38_core_rx_ifp_packet(p->t38_core_state, f->data.ptr, f->datalen, f->seqno);
 		return 1;
-	} else if ((f->frametype == AST_FRAME_VOICE) && (f->subclass.codec == AST_FORMAT_SLINEAR)) {
+	} else if (f->data.ptr && (f->frametype == AST_FRAME_VOICE) && (f->subclass.codec == AST_FORMAT_SLINEAR)) {
 		t38_gateway_rx(&p->t38_gw_state, f->data.ptr, f->samples);
 		return 1;
 	}




More information about the asterisk-commits mailing list