summaryrefslogtreecommitdiff
path: root/res/res_fax.c
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2013-12-19 17:03:20 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2013-12-19 17:03:20 +0000
commitc061f634da53715c0aa17a450c1177a14fdf4713 (patch)
treec799eddc91f3b97fb1595bd7f7eccb31172b85c4 /res/res_fax.c
parente4803bbd9eba2705615e2495de0ed0c35051dd45 (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_fax.c')
-rw-r--r--res/res_fax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 55bd3c6b7..76fe0ca98 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -3412,7 +3412,7 @@ static struct ast_frame *fax_detect_framehook(struct ast_channel *chan, struct a
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) {