From: Mike Jerris Date: Mon, 29 Jan 2018 19:39:41 +0000 (-0600) Subject: FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae... X-Git-Tag: v1.8.1~3^2~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94a094c5efedc698345ba6159827d5862d9d8cbe;p=thirdparty%2Ffreeswitch.git FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae with malformed xml --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 104a3ef4cb..d04fb02533 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -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");