Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1191)

Unified Diff: Source/core/platform/audio/ReverbConvolverStage.cpp

Issue 24078013: Merge 157007 "Don't read past the end of the impulseResponse array" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1599/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/ReverbConvolverStage.cpp
===================================================================
--- Source/core/platform/audio/ReverbConvolverStage.cpp (revision 157831)
+++ Source/core/platform/audio/ReverbConvolverStage.cpp (working copy)
@@ -58,8 +58,11 @@
m_fftKernel->doPaddedFFT(impulseResponse + stageOffset, stageLength);
m_fftConvolver = adoptPtr(new FFTConvolver(fftSize));
} else {
+ ASSERT(!stageOffset);
+ ASSERT(stageLength <= fftSize / 2);
+
m_directKernel = adoptPtr(new AudioFloatArray(fftSize / 2));
- m_directKernel->copyToRange(impulseResponse + stageOffset, 0, fftSize / 2);
+ m_directKernel->copyToRange(impulseResponse, 0, stageLength);
m_directConvolver = adoptPtr(new DirectConvolver(renderSliceSize));
}
m_temporaryBuffer.allocate(renderSliceSize);
Property changes on: Source/core/platform/audio/ReverbConvolverStage.cpp
___________________________________________________________________
Modified: svn:eol-style
- native
+ LF
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698