]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
authorMatthew Jordan <mjordan@digium.com>
Thu, 6 Mar 2014 01:58:10 +0000 (01:58 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 6 Mar 2014 01:58:10 +0000 (01:58 +0000)
commit69192903af21cc9f5561581b700c857e5678bbbb
tree3bf947bea9015e93afd67dcfe031f23e3a4a40dc
parenta14a4d5194c7be3acb899b974ee87735cc1d70a7
res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp

When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

Review: https://reviewboard.asterisk.org/r/3296

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_fax_spandsp.c