]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk.c: Fix uninitialized memory crash. 58/4658/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:22:44 +0000 (12:22 -0600)
commita9e459f8ace24f4d0c4febc2eb7fa17162c577c6
tree666e400f8cc576d138fef5a12b21fb7336339224
parent0aa5db4b38e80a059c3cd2c1d70ee9c509c0f488
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