Skip to content

Commit

Permalink
Fixed SDP media transport protocol info parsing (pjsip#3802)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored and dshamaev-intermedia committed Mar 22, 2024
1 parent 566505a commit 3eda647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pjmedia/src/pjmedia/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3eda647

Please sign in to comment.