diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-08-31 21:15:07 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-08-31 21:15:07 +0000 |
commit | e7ef4698261752b279bb4ee51a4f0b32b2531bd5 (patch) | |
tree | 2b0f5b28a8c9d241e959e3deb247a490c94db92d /res/res_rtp_asterisk.c | |
parent | 1ab2639cf2d5e8df3aa2c5b7d7c41896fd8846d6 (diff) |
Prevent local RTP bridges from sending inappropriate formats to participants.
A change for Asterisk 11 caused a check for failure to incorrectly check the return
value. This resulted in the possibility of transmitting media that a party had not
negotiated. If this media happened to be G.729, then this could potentially result
in one-way audio if no G.729 translators are installed.
(closes issue ASTERISK-20296)
reported by NITESH BANSAL
........
Merged revisions 372118 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r-- | res/res_rtp_asterisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index aa7895bb2..fad313c2b 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2789,7 +2789,7 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int } /* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */ - if (!ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) && + if ((ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) == -1) && !ast_rtp_codecs_get_payload_format(ast_rtp_instance_get_codecs(instance1), bridged_payload)) { return -1; } |