[mod_sofia] coverity CID 1024750 (Dereference null return value)

This commit is contained in:
Dragos Oancea 2023-05-31 15:51:14 +03:00 committed by Andrey Volk
parent 716a9febc1
commit 6e25c0bc91

View 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;
}