From 94a094c5efedc698345ba6159827d5862d9d8cbe Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Mon, 29 Jan 2018 13:39:41 -0600 Subject: [PATCH] FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae with malformed xml --- src/mod/endpoints/mod_sofia/sofia_presence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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");