Commit 5501bb28 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/g2meet: Check tile_width in epic_jb_decode_tile()

Fixes: out of array access
Fixes: 21469/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5199357982015488

Alternatively the arrays can be made bigger or the index can be clipped.
In case a real file with such huge tiles exist we ask the user to upload it.
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 81fe316a
......@@ -917,6 +917,11 @@ static int epic_jb_decode_tile(G2MContext *c, int tile_x, int tile_y,
awidth = FFALIGN(tile_width, 16);
aheight = FFALIGN(tile_height, 16);
if (tile_width > (1 << FF_ARRAY_ELEMS(c->ec.prev_row_rung))) {
avpriv_request_sample(avctx, "large tile width");
return AVERROR_INVALIDDATA;
}
if (els_dsize) {
int ret, i, j, k;
uint8_t tr_r, tr_g, tr_b, *buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment