Fix UAF in MultiplexDecoderFactory::GetSupportedFormats
Bug: chromium:1378571 Change-Id: I01f105a2f2820af440cf64c654b321f34186d7e0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280961 Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38493}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
c350113a63
commit
aa8f28d082
@ -82,16 +82,17 @@ MultiplexDecoderFactory::MultiplexDecoderFactory(
|
||||
std::vector<SdpVideoFormat> MultiplexDecoderFactory::GetSupportedFormats()
|
||||
const {
|
||||
std::vector<SdpVideoFormat> formats = factory_->GetSupportedFormats();
|
||||
std::vector<SdpVideoFormat> augmented_formats = formats;
|
||||
for (const auto& format : formats) {
|
||||
if (absl::EqualsIgnoreCase(format.name, kMultiplexAssociatedCodecName)) {
|
||||
SdpVideoFormat multiplex_format = format;
|
||||
multiplex_format.parameters[cricket::kCodecParamAssociatedCodecName] =
|
||||
format.name;
|
||||
multiplex_format.name = cricket::kMultiplexCodecName;
|
||||
formats.push_back(multiplex_format);
|
||||
augmented_formats.push_back(multiplex_format);
|
||||
}
|
||||
}
|
||||
return formats;
|
||||
return augmented_formats;
|
||||
}
|
||||
|
||||
std::unique_ptr<VideoDecoder> MultiplexDecoderFactory::CreateVideoDecoder(
|
||||
|
||||
Reference in New Issue
Block a user