b=991533 limit AudioBuffer channel count r=padenot

--HG--
extra : transplant_source : %28%F0%2Cc%FE%60%B3%EE%A0O%3F%E6%C4%C4%F9%88%1C%E3%89%09
This commit is contained in:
Karl Tomlinson 2014-05-16 09:23:38 +12:00
parent 63192b0276
commit 4980cab4b0

View File

@ -74,6 +74,7 @@ AudioBuffer::Create(AudioContext* aContext, uint32_t aNumberOfChannels,
// to createScriptProcessor(), one of which may be zero.
if (aSampleRate < WebAudioUtils::MinSampleRate ||
aSampleRate > WebAudioUtils::MaxSampleRate ||
aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
!aLength || aLength > INT32_MAX) {
aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;