Skip to content

Commit

Permalink
Fix ResourceEndpoint length check (#1411)
Browse files Browse the repository at this point in the history
ResourceEndpoint length check mistakenly uses ChannelName max length.
  • Loading branch information
thinkski authored Mar 9, 2022
1 parent b4f4516 commit 7547e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/source/Signaling/LwsApiCalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ STATUS getChannelEndpointLws(PSignalingClient pSignalingClient, UINT64 time)
i++;
} else if (compareJsonString(pResponseStr, &tokens[i], JSMN_STRING, (PCHAR) "ResourceEndpoint")) {
strLen = (UINT32) (tokens[i + 1].end - tokens[i + 1].start);
CHK(strLen <= MAX_CHANNEL_NAME_LEN, STATUS_INVALID_API_CALL_RETURN_JSON);
CHK(strLen <= MAX_SIGNALING_ENDPOINT_URI_LEN, STATUS_INVALID_API_CALL_RETURN_JSON);
pEndpoint = pResponseStr + tokens[i + 1].start;
endpointLen = strLen;
endpoint = TRUE;
Expand Down

0 comments on commit 7547e6e

Please sign in to comment.