fatal: cannot run /usr/local/google/home/vmiura/bin/query-watchman: No such file or directory fatal: cannot run /usr/local/google/home/vmiura/bin/query-watchman: No such file or directory diff --git a/media/mojo/services/mojo_decryptor_service.cc b/media/mojo/services/mojo_decryptor_service.cc index 0476042c20daf..98dc00787b0ed 100644 --- a/media/mojo/services/mojo_decryptor_service.cc +++ b/media/mojo/services/mojo_decryptor_service.cc @@ -125,6 +125,18 @@ void MojoDecryptorService::InitializeVideoDecoder( const VideoDecoderConfig& config, InitializeVideoDecoderCallback callback) { DVLOG(2) << __func__; + + // Commit 36ab3814f2c58 removed IsValidConfig() from the + // VideoDecoderConfig mojom trait and moved it to consumers, but missed + // this consumer. Restore the check that previously protected the library + // CDM (CdmAdapter -> closed-source binary) from out-of-spec coded_size. + // Mirrors mojo_video_decoder_service.cc:257-263. + if (!config.IsValidConfig()) { + std::move(callback).Run(false); + mojo::ReportBadMessage("Invalid VideoDecoderConfig"); + return; + } + decryptor_->InitializeVideoDecoder( config, base::BindOnce(&MojoDecryptorService::OnVideoDecoderInitialized, weak_this_, std::move(callback)));