Merge changes from topic 'ASTERISK-26672' into 13

* changes:
  res_rtp_asterisk.c: Fix uninitialized memory crash.
  chan_rtp.c: Fix uninitialized memory crash.
This commit is contained in:
Joshua Colp
2017-01-09 07:22:18 -06:00
committed by Gerrit Code Review
2 changed files with 18 additions and 15 deletions

View File

@@ -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,