From: Dragos Oancea Date: Wed, 31 May 2023 12:51:14 +0000 (+0300) Subject: [mod_sofia] coverity CID 1024750 (Dereference null return value) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e25c0bc918464b03fd7a633af382f39ae3b4d6f;p=thirdparty%2Ffreeswitch.git [mod_sofia] coverity CID 1024750 (Dereference null return value) --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index f14b574adf..c5b5bcc190 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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; }