sofia-sip: fix null derefernce segfault in soa

This commit is contained in:
Michael Jerris 2010-05-31 08:55:42 -04:00
parent f029ce07b7
commit f356c5e6f3
2 changed files with 10 additions and 9 deletions

View File

@ -1 +1 @@
Fri Mar 26 12:20:14 CDT 2010
Mon May 31 08:54:37 EDT 2010

View File

@ -1289,18 +1289,19 @@ static int offer_answer_step(soa_session_t *ss,
/* Step F0: Initialize o= line */
if (fresh) {
if (user->sdp_origin)
if (user->sdp_origin) {
o->o_username = user->sdp_origin->o_username;
if (user->sdp_origin->o_address)
o->o_address = user->sdp_origin->o_address;
if (user->sdp_origin->o_address)
o->o_address = user->sdp_origin->o_address;
if (user->sdp_origin->o_id)
o->o_id = user->sdp_origin->o_id;
if (user->sdp_origin->o_id)
o->o_id = user->sdp_origin->o_id;
if (user->sdp_origin->o_version && user->sdp_origin->o_version != o->o_version) {
o->o_version = user->sdp_origin->o_version;
o->o_version--;
if (user->sdp_origin->o_version && user->sdp_origin->o_version != o->o_version) {
o->o_version = user->sdp_origin->o_version;
o->o_version--;
}
}
if (soa_init_sdp_origin_with_session(ss, o, c0_buffer, local) < 0) {