From 8f4b0405bcdc6c1461eca4f4381970c28824bc8b Mon Sep 17 00:00:00 2001 From: "K.Ohta" Date: Thu, 22 Oct 2020 20:30:25 +0900 Subject: [PATCH] [COMMON] Fix access violation in high/low pass filters. --- source/src/common.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/common.cpp b/source/src/common.cpp index 102b969a9..777729c72 100644 --- a/source/src/common.cpp +++ b/source/src/common.cpp @@ -2486,8 +2486,8 @@ void DLL_PREFIX calc_high_pass_filter(int32_t* dst, int32_t* src, int sample_fre if(alpha <= 0.0f) alpha = 0.0f; float ialpha = 1.0f - alpha; - __DECL_ALIGNED(16) float tmp_v[samples * 2]; // 2ch stereo - __DECL_ALIGNED(16) float tmp_h[samples * 2]; + __DECL_ALIGNED(16) float tmp_v[samples * 2 + 4]; // 2ch stereo + __DECL_ALIGNED(16) float tmp_h[samples * 2 + 4]; for(int i = 0; i < (samples * 2); i ++) { tmp_h[i] = (float)(src[i]); } @@ -2523,8 +2523,8 @@ void DLL_PREFIX calc_low_pass_filter(int32_t* dst, int32_t* src, int sample_freq if(alpha <= 0.0f) alpha = 0.0f; float ialpha = 1.0f - alpha; - __DECL_ALIGNED(16) float tmp_v[samples * 2]; // 2ch stereo - __DECL_ALIGNED(16) float tmp_h[samples * 2]; + __DECL_ALIGNED(16) float tmp_v[samples * 2 + 4]; // 2ch stereo + __DECL_ALIGNED(16) float tmp_h[samples * 2 + 4]; for(int i = 0; i < (samples * 2); i++) { tmp_h[i] = (float)(src[i]); -- 2.11.0