提交 ecc3f313 authored 作者: Stefan Knoblich's avatar Stefan Knoblich

mod_sofia: Follow-up fix for FS-5009 to avoid NULL-ptr dereference

Commit f913670e changed switch_core_session_sprintf() args
from sip->sip_to to sip->sip_from, but didn't update the enclosing if()
clause protecting the code from dereferencing NULL pointers.
Signed-off-by: 's avatarStefan Knoblich <stkn@openisdn.net>
上级 41b2ce51
...@@ -7753,7 +7753,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia ...@@ -7753,7 +7753,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
calling_myself++; calling_myself++;
} }
if (sip && sip->sip_to) { if (sip && sip->sip_from) {
user = switch_core_session_sprintf(session, "%s@%s", sip->sip_from->a_url->url_user, sip->sip_from->a_url->url_host); user = switch_core_session_sprintf(session, "%s@%s", sip->sip_from->a_url->url_user, sip->sip_from->a_url->url_host);
switch_ivr_set_user(session, user); switch_ivr_set_user(session, user);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论