summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg2000dwt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-22 23:10:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-22 23:18:47 +0200
commitf067ee57c95d724ff795f8d6b0c6ba05010008f1 (patch)
tree83a73a6ea2a2145315cfa7699f6bf37f8496bb94 /libavcodec/jpeg2000dwt.c
parent8428e2c5f37ef873652122be1370b652915f9e4c (diff)
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>
Diffstat (limited to 'libavcodec/jpeg2000dwt.c')
-rw-r--r--libavcodec/jpeg2000dwt.c9
1 files changed, 5 insertions, 4 deletions
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];