You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario:
Load a device with 3 codec caps: opus, pcma, pcmu.
Create a SendTransport & then call Produce restricting the codec by forcing pcmu.
In ortc.cppreduceCodecs will check the Device caps array, it will get to pcmu which is the third and last element (idx == 2), and call isRtxCodec on it.
if (matchCodecs(codecs[idx], const_cast<json&>(*capCodec)))
{
filteredCodecs.push_back(codecs[idx]);
if (isRtxCodec(codecs[idx + 1]))
filteredCodecs.push_back(codecs[idx + 1]);
break;
}
This will effectively force nlohmann::json object to do an out-of-bounds access. The library guards against this by adding a null object to the end of the array:.
This will throw further down the line when matchCodecstries to match the mimeType and it's looking for a string type not an obj type.
The text was updated successfully, but these errors were encountered:
Scenario:
Load a device with 3 codec caps: opus, pcma, pcmu.
Create a SendTransport & then call
Produce
restricting thecodec
by forcing pcmu.In ortc.cpp
reduceCodecs
will check the Device caps array, it will get to pcmu which is the third and last element (idx == 2), and callisRtxCodec
on it.This will effectively force nlohmann::json object to do an out-of-bounds access. The library guards against this by adding a null object to the end of the array:.
This will throw further down the line when
matchCodecs
tries to match the mimeType and it's looking for a string type not an obj type.The text was updated successfully, but these errors were encountered: