]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk.c: Fix uninitialized memory crash. 70/4670/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:26:46 +0000 (12:26 -0600)
commitd8747659f0a4b592ec41cb78015932fc2a9de510
tree891da47ae036e39e3971d8d1d8783601a274322d
parenta9400da2d34e4cbd4e42004ca47cac51fd22d5a0
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