summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg2000.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-11-30 21:51:56 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-01 23:12:07 +0100
commitb5587fd2c6ce39bad7a5e7ebb3bd86b6469648de (patch)
tree67609c94bb610354ab76aadb906f62cde6049535 /libavcodec/jpeg2000.h
parent0674087004538599797688785f6ac82358abc23b (diff)
avcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoder
Reduces memory needed. Fixes: OOM Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/jpeg2000.h')
-rw-r--r--libavcodec/jpeg2000.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h
index eaf7faf342..752feae96b 100644
--- a/libavcodec/jpeg2000.h
+++ b/libavcodec/jpeg2000.h
@@ -173,7 +173,7 @@ typedef struct Jpeg2000Cblk {
int nb_terminations;
int nb_terminationsinc;
int data_start[JPEG2000_MAX_PASSES];
- Jpeg2000Pass passes[JPEG2000_MAX_PASSES];
+ Jpeg2000Pass *passes;
int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}}
} Jpeg2000Cblk; // code block