diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-05-13 22:42:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-05-17 00:36:20 +0200 |
commit | ea29f07b2f0ef6f97f34ddd3478769f19fdcde90 (patch) | |
tree | 1a7212a2241e3e44a0cfd8151aedaa24ba261015 | |
parent | 1ead7ed5bf3a0a96ceba3d76e7dca5e54fff2dd5 (diff) | |
download | ffmpeg-ea29f07b2f0ef6f97f34ddd3478769f19fdcde90.tar.gz |
avcodec/jpeg2000dec: Free packed_headers
Fixes: memleak
Fixes: 21784/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-565256551058636
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/jpeg2000dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 460a4ad95c..65555424ed 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -2014,6 +2014,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s) ff_jpeg2000_cleanup(comp, codsty); } av_freep(&s->tile[tileno].comp); + av_freep(&s->tile[tileno].packed_headers); + s->tile[tileno].packed_headers_size = 0; } } av_freep(&s->tile); |