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>
(cherry picked from commit d6fe3786cd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8577a6b2fe
commit
435b00a7cc
1 changed files with 1 additions and 0 deletions
|
|
@ -1231,6 +1231,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--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue