From 3eda6477b8c9167123a4badcc8b0ba83685cd3e8 Mon Sep 17 00:00:00 2001 From: sauwming Date: Thu, 14 Dec 2023 12:22:14 +0800 Subject: [PATCH] Fixed SDP media transport protocol info parsing (#3802) --- pjmedia/src/pjmedia/sdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pjmedia/src/pjmedia/sdp.c b/pjmedia/src/pjmedia/sdp.c index b4b5f0d885..88a68cac07 100644 --- a/pjmedia/src/pjmedia/sdp.c +++ b/pjmedia/src/pjmedia/sdp.c @@ -1770,7 +1770,7 @@ PJ_DEF(pj_uint32_t) pjmedia_sdp_transport_get_proto(const pj_str_t *tp) PJ_ASSERT_RETURN(tp, PJMEDIA_TP_PROTO_NONE); idx = pj_strtok2(tp, "/", &token, 0); - if (idx != tp->slen) + if ((idx != tp->slen) && (tp->slen != token.slen)) pj_strset(&rest, tp->ptr + token.slen + 1, tp->slen - token.slen - 1); if (pj_stricmp2(&token, "RTP") == 0) {