Skip to content
Snippets Groups Projects
Commit 7814913d authored by Mark Michelson's avatar Mark Michelson
Browse files

Be sure to heap-allocate the redirecting to tag so as not to cause crashiness.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a21192f4
No related branches found
No related tags found
No related merge requests found
......@@ -17540,6 +17540,10 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
ast_free(redirecting->from.tag);
}
redirecting->from.tag = ast_strdup(p->cid_tag);
if (redirecting->to.tag) {
ast_free(redirecting->to.tag);
}
redirecting->to.tag = ast_strdup(p->cid_tag);
}
if (!ast_strlen_zero(redirecting_to_number)) {
if (redirecting->to.number) {
......@@ -17555,7 +17559,6 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
ast_debug(3, "Got redirecting to name %s\n", redirecting_from_number);
redirecting->to.name = redirecting_to_name;
}
redirecting->to.tag = (char *) p->cid_tag;
redirecting->reason = reason;
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment