zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 6540188d33bb0b252e9f1b21412ac9d3e3518b53
parent 7d66d9fce6f8f6f6863700166e45996190c4b09e
Author: fundamental <[email protected]>
Date:   Thu, 23 Mar 2017 13:56:45 -0400

Fix Possible Crash With Too Many PAD Samples

Diffstat:
Msrc/Params/PADnoteParameters.cpp | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -848,6 +848,9 @@ void PADnoteParameters::sampleGenerator(PADnoteParameters::callback cb, if(samplemax == 0) samplemax = 1; + if(samplemax > PAD_MAX_SAMPLES) + samplemax = PAD_MAX_SAMPLES; + //prepare a BIG FFT FFTwrapper *fft = new FFTwrapper(samplesize); fft_t *fftfreqs = new fft_t[samplesize / 2];