[asterisk-commits] sgriepentrog: trunk r404353 - in /trunk: ./ res/res_fax.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 19 11:03:22 CST 2013


Author: sgriepentrog
Date: Thu Dec 19 11:03:20 2013
New Revision: 404353

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404353
Log:
res_fax.c: crash on framehook with no dsp in fax detect

In fax_detect_framehook() a null pointer reference can occur where a
voice frame is processed but no dsp is attached to the fax detection
structure.  The code block that rejects frames that detection cannot
be processed on is checking for dsp but falls through when it should
instead return, as this change implements.

(closes issue ASTERISK-22942)
Reported by: adomjan
Review: https://reviewboard.asterisk.org/r/3076/
........

Merged revisions 404351 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 404352 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_fax.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_fax.c?view=diff&rev=404353&r1=404352&r2=404353
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Thu Dec 19 11:03:20 2013
@@ -3412,7 +3412,7 @@
 	case AST_FRAME_VOICE:
 		/* we have no DSP this means we not detecting CNG */
 		if (!faxdetect->dsp) {
-			break;
+			return f;
 		}
 		/* We can only process some formats*/
 		switch (f->subclass.format.id) {




More information about the asterisk-commits mailing list