]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk.c: Fix uninitialized memory crash. 62/4662/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:24:03 +0000 (12:24 -0600)
commit64edb4e05c1f1a0383891f8d69a742f36a39584e
tree021e3c0adfd141ad3733fa387359ad17d072b1e5
parente4d4d9b4124d773bbc4e6de69e8e9456f3a592de
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