]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10926: [mod_sofia] fix crash from malformed as-feature-event subscribe messae...
authorMike Jerris <mike@jerris.com>
Mon, 29 Jan 2018 19:39:41 +0000 (13:39 -0600)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:39 +0000 (07:21 +0000)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 104a3ef4cb645823aeaf0c02c99170dbb42fa88e..d04fb02533ba3900d2a04390c4df5e7cf73ad2b5 100644 (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");