[asterisk-commits] sgriepentrog: branch 11 r404351 - /branches/11/res/res_fax.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 19 10:57:32 CST 2013


Author: sgriepentrog
Date: Thu Dec 19 10:57:29 2013
New Revision: 404351

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404351
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/


Modified:
    branches/11/res/res_fax.c

Modified: branches/11/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/res/res_fax.c?view=diff&rev=404351&r1=404350&r2=404351
==============================================================================
--- branches/11/res/res_fax.c (original)
+++ branches/11/res/res_fax.c Thu Dec 19 10:57:29 2013
@@ -3343,7 +3343,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