summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-01-09 07:22:18 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-01-09 07:22:18 -0600
commitfdfa805552ac8c85162fe40dd0da9a516ae93922 (patch)
tree6f3b034249ae03c0a70a4b4d0988b76eae85f6af /channels
parentf8cd73ec3c159f2e6c464952c92d8fdb69394371 (diff)
parenta9e459f8ace24f4d0c4febc2eb7fa17162c577c6 (diff)
Merge changes from topic 'ASTERISK-26672' into 13
* changes: res_rtp_asterisk.c: Fix uninitialized memory crash. chan_rtp.c: Fix uninitialized memory crash.
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_rtp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_rtp.c b/channels/chan_rtp.c
index f1f4f05b9..d671706b2 100644
--- a/channels/chan_rtp.c
+++ b/channels/chan_rtp.c
@@ -316,7 +316,12 @@ static struct ast_channel *unicast_rtp_request(const char *type, struct ast_form
engine_name = S_COR(ast_test_flag(&opts, OPT_RTP_ENGINE),
opt_args[OPT_ARG_RTP_ENGINE], "asterisk");
- ast_ouraddrfor(&address, &local_address);
+ ast_sockaddr_copy(&local_address, &address);
+ if (ast_ouraddrfor(&address, &local_address)) {
+ ast_log(LOG_ERROR, "Could not get our address for sending media to '%s'\n",
+ args.destination);
+ goto failure;
+ }
instance = ast_rtp_instance_new(engine_name, NULL, &local_address, NULL);
if (!instance) {
ast_log(LOG_ERROR,