From 65e4605445dde0cf1270632dbf6786469c752677 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 27 Apr 2016 17:51:40 +1000 Subject: [PATCH] Bug 1267637: [AT] P6. Reject audio data with unsupported channel configuration. r=gerald MozReview-Commit-ID: IrjTi5gWp7F --HG-- extra : rebase_source : b6a9887ff7154286f3f5a1357034ecd3ab29fe27 --- dom/media/platforms/apple/AppleATDecoder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dom/media/platforms/apple/AppleATDecoder.cpp b/dom/media/platforms/apple/AppleATDecoder.cpp index 29612167ae3c..6d364c25d9ce 100644 --- a/dom/media/platforms/apple/AppleATDecoder.cpp +++ b/dom/media/platforms/apple/AppleATDecoder.cpp @@ -283,6 +283,9 @@ AppleATDecoder::DecodeSample(MediaRawData* aSample) if (mChannelLayout && !mAudioConverter) { AudioConfig in(*mChannelLayout.get(), rate); AudioConfig out(channels, rate); + if (!in.IsValid() || !out.IsValid()) { + return NS_ERROR_FAILURE; + } mAudioConverter = MakeUnique(in, out); } if (mAudioConverter) {