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 <michaelni@gmx.at>
pull/138/head
Michael Niedermayer 10 years ago
parent 8428e2c5f3
commit f067ee57c9
  1. 9
      libavcodec/jpeg2000dwt.c

@ -700,11 +700,12 @@ static int test_dwtf(float *array, float *ref, uint16_t border[2][2], int decomp
return 0; 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 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; AVLFG prng;
int i,j; int i,j;
uint16_t border[2][2]; uint16_t border[2][2];

Loading…
Cancel
Save