mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-10 12:09:53 +00: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> (cherry picked from commitd6fe3786cd) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit39f4a60035) Signed-off-by: Carlos Henrique Lima Melara <charlesmelara@riseup.net>
This commit is contained in:
parent
a7f6ee19a8
commit
be1665dbec
1 changed files with 1 additions and 0 deletions
|
|
@ -1219,6 +1219,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