History

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

Michael Niedermayer committed 1 year ago

Commit d6fe3781 parent 6d9f0b61 file · +1 −0Browse files

Unified · Split

libavcodec/jpeg2000dec.c+1−0
@@ -1532,6 +1532,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, · 1531 unmodified lines
1532 1532
1533 bytestream2_get_bufferu(&s->g, cblk->data + cblk->length, cblk->lengthinc[cwsno]);1533 bytestream2_get_bufferu(&s->g, cblk->data + cblk->length, cblk->lengthinc[cwsno]);
1534 cblk->length += cblk->lengthinc[cwsno];1534 cblk->length += cblk->lengthinc[cwsno];
1535 memset(cblk->data + cblk->length, 0, 4);
1535 cblk->lengthinc[cwsno] = 0;1536 cblk->lengthinc[cwsno] = 0;
1536 if (cblk->nb_terminationsinc) {1537 if (cblk->nb_terminationsinc) {
1537 cblk->nb_terminationsinc--;1538 cblk->nb_terminationsinc--;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t