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

This commit is contained in:
Mike Jerris
2018-01-29 13:39:41 -06:00
committed by Muteesa Fred
parent adb813e089
commit 94a094c5ef
+2 -2
View File
@@ -4253,7 +4253,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
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_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetDoNotDisturb");
@@ -4263,7 +4263,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_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Feature-Action", "SetCallForward");