Commit eff3cc6f5e for freeswitch.com
commit eff3cc6f5e8035eb6a5c9af19a990e307bd207d9
Author: Dmitry Verenitsin <morbit85@gmail.com>
Date: Wed Nov 4 19:42:01 2026 +0500
[core] Check for a missing To-Path before msrp_find_uuid() reads it
`msrp_find_uuid()` called `strlen()` on the To-Path before asserting
it was set, and a first SEND without a To-Path header passes NULL.
Return `SWITCH_FALSE` for it, so the worker handles it like any
To-Path that names no session.
diff --git a/src/switch_msrp.c b/src/switch_msrp.c
index 5c8578be50..4bac62e283 100644
--- a/src/switch_msrp.c
+++ b/src/switch_msrp.c
@@ -1066,10 +1066,15 @@ switch_status_t msrp_report(switch_msrp_client_socket_t *csock, switch_msrp_msg_
static switch_bool_t msrp_find_uuid(char *uuid, const char *to_path)
{
- int len = strlen(to_path);
+ int len;
int i;
int slash_count = 0;
- switch_assert(to_path);
+
+ if (!to_path) {
+ return SWITCH_FALSE;
+ }
+
+ len = strlen(to_path);
for(i=0; i<len; i++){
if (*(to_path + i) == '/') {
if (++slash_count == 3) break;