You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/jpeg2000dec: Make sure the 4 extra bytes allocated are initialized
Fixes: use of uninitialized memory Fixes: 429130590/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_DEC_fuzzer-5736930522497024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
6d9f0b662f
commit
d6fe3786cd
@@ -1532,6 +1532,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
|
||||
|
||||
bytestream2_get_bufferu(&s->g, cblk->data + cblk->length, cblk->lengthinc[cwsno]);
|
||||
cblk->length += cblk->lengthinc[cwsno];
|
||||
memset(cblk->data + cblk->length, 0, 4);
|
||||
cblk->lengthinc[cwsno] = 0;
|
||||
if (cblk->nb_terminationsinc) {
|
||||
cblk->nb_terminationsinc--;
|
||||
|
Reference in New Issue
Block a user