]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] coverity CID 1024750 (Dereference null return value)
authorDragos Oancea <dragos@signalwire.com>
Wed, 31 May 2023 12:51:14 +0000 (15:51 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 31 May 2023 21:43:07 +0000 (00:43 +0300)
src/mod/endpoints/mod_sofia/sofia.c

index f14b574adf90a3c519d4f7e9a8e212919308eea3..c5b5bcc1901505d3392e0e8a9e3384652d4e1517 100644 (file)
@@ -2818,7 +2818,10 @@ void event_handler(switch_event_t *event)
 
                        if ((sptr = strstr(fixed_contact_str, needle))) {
                                char *origsptr = strstr(contact_str, needle);
-                               eptr = strchr(++origsptr, ';');
+
+                               if (origsptr) {
+                                       eptr = strchr(++origsptr, ';');
+                               }
                        } else {
                                sptr = strchr(fixed_contact_str, '\0') - 1;
                        }