提交 c11c8491 authored 作者: Mike Jerris's avatar Mike Jerris

FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae with malformed xml

上级 074c179f
...@@ -4251,7 +4251,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -4251,7 +4251,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "device", device->txt); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "device", device->txt);
} }
if (!strcmp(xml->name, "SetDoNotDisturb")) { if (xml->name && !strcmp(xml->name, "SetDoNotDisturb")) {
switch_xml_t action = NULL; switch_xml_t action = NULL;
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetDoNotDisturb"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetDoNotDisturb");
...@@ -4261,7 +4261,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -4261,7 +4261,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
} }
} }
if (!strcmp(xml->name, "SetForwarding")) { if (xml->name && !strcmp(xml->name, "SetForwarding")) {
switch_xml_t cfwd_type, cfwd_enable, cfwd_target; switch_xml_t cfwd_type, cfwd_enable, cfwd_target;
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetCallForward"); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetCallForward");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论