]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk.c: Fix uninitialized memory crash. 66/4666/1
authorRichard Mudgett <rmudgett@digium.com>
Wed, 21 Dec 2016 22:28:00 +0000 (16:28 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 22 Dec 2016 18:25:15 +0000 (12:25 -0600)
commitb576b58d74e2ec85bdd4ea62912261896beee976
treeabd47b566fa5372e9738f8c89e6d2d292633ae67
parent67b47191e9cc7f329d8a6803eb49f8cba8e68b1d
res_rtp_asterisk.c: Fix uninitialized memory crash.

ast_rtp_remote_address_set() could pass an uninitialized 'us' parameter to
ast_ouraddrfor().  If ast_ouraddrfor() returns an error then the 'us'
parameter may not get initialized.  Thus when the code tries to save the
'us' parameter to the local address we could try to copy a ridiculous
sized memory buffer and segfault.

* Made pass an initialized 'us' parameter to ast_ouraddrfor().

* Optimized out the 'us' struct variable.

ASTERISK-26672 #close

Change-Id: I4acea5dcdf0813da2c7d3e11c2d6067d160d17dc
res/res_rtp_asterisk.c