From f067ee57c95d724ff795f8d6b0c6ba05010008f1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 22 Jun 2015 23:10:31 +0200 Subject: avcodec/jpeg2000dwt: Move large arrays used in the test code away from the stack This should avoid problems on systems with little stack space and fix some crashes in fate crash found-by: jamrial Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dwt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libavcodec/jpeg2000dwt.c') diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c index dde93fe31e..e090eba10e 100644 --- a/libavcodec/jpeg2000dwt.c +++ b/libavcodec/jpeg2000dwt.c @@ -700,11 +700,12 @@ static int test_dwtf(float *array, float *ref, uint16_t border[2][2], int decomp return 0; } +static int array[MAX_W * MAX_W]; +static int ref [MAX_W * MAX_W]; +static float arrayf[MAX_W * MAX_W]; +static float reff [MAX_W * MAX_W]; + int main(void) { - int array[MAX_W * MAX_W]; - int ref [MAX_W * MAX_W]; - float arrayf[MAX_W * MAX_W]; - float reff [MAX_W * MAX_W]; AVLFG prng; int i,j; uint16_t border[2][2]; -- cgit v1.2.3