diff options
author | David Vossel <dvossel@digium.com> | 2011-06-23 18:26:09 +0000 |
---|---|---|
committer | David Vossel <dvossel@digium.com> | 2011-06-23 18:26:09 +0000 |
commit | d5ea9e5ae2156717076fc6d53b572a4844819624 (patch) | |
tree | 915035c5ccad04222b4618fc9ac9c7a920c840ee /channels/chan_iax2.c | |
parent | d7e2d2248c664fc476539bfd9925da38424fae71 (diff) |
Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
Merged revisions 324634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
Merged revisions 324627 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
Addresses AST-2011-010, remote crash in IAX2 driver
Thanks to twilson for identifying the issue and providing the patches.
AST-2011-010
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 0802474ee..f3a097e7d 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -5363,10 +5363,6 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat /* these two cannot be sent, because they require a result */ errno = ENOSYS; return -1; - case AST_OPTION_FORMAT_READ: - case AST_OPTION_FORMAT_WRITE: - case AST_OPTION_MAKE_COMPATIBLE: - return -1; case AST_OPTION_OPRMODE: errno = EINVAL; return -1; @@ -5383,7 +5379,16 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat ast_mutex_unlock(&iaxsl[callno]); return 0; } - default: + /* These options are sent to the other side across the network where + * they will be passed to whatever channel is bridged there. Don't + * do anything silly like pass an option that transmits pointers to + * memory on this machine to a remote machine to use */ + case AST_OPTION_TONE_VERIFY: + case AST_OPTION_TDD: + case AST_OPTION_RELAXDTMF: + case AST_OPTION_AUDIO_MODE: + case AST_OPTION_DIGIT_DETECT: + case AST_OPTION_FAX_DETECT: { unsigned short callno = PTR_TO_CALLNO(c->tech_pvt); struct chan_iax2_pvt *pvt; @@ -5411,7 +5416,12 @@ static int iax2_setoption(struct ast_channel *c, int option, void *data, int dat ast_free(h); return res; } + default: + return -1; } + + /* Just in case someone does a break instead of a return */ + return -1; } static int iax2_queryoption(struct ast_channel *c, int option, void *data, int *datalen) |