Fixes: use of uninitialized memory Fixes: 429130590/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_DEC_fuzzer-5736930522497024
Unified · Split
| @@ -1532,6 +1532,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, · 1531 unmodified lines | ||
| 1532 | 1532 | |
| 1533 | 1533 | bytestream2_get_bufferu(&s->g, cblk->data + cblk->length, cblk->lengthinc[cwsno]); |
| 1534 | 1534 | cblk->length += cblk->lengthinc[cwsno]; |
| 1535 | + memset(cblk->data + cblk->length, 0, 4); | |
| 1535 | 1536 | cblk->lengthinc[cwsno] = 0; |
| 1536 | 1537 | if (cblk->nb_terminationsinc) { |
| 1537 | 1538 | cblk->nb_terminationsinc--; |