mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
libavcodec/cbs_apv_syntax_template: limit tile to 2gb
We do not support larger tiles as we use signed int Alternatively we can check this in apv_decode_tile_component() or init_get_bits*() or support bitstreams above 2gb length Fixes: init_get_bits() failure later Fixes: 421817631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-4957386534354944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -263,7 +263,7 @@ static int FUNC(frame)(CodedBitstreamContext *ctx, RWContext *rw,
|
|||||||
CHECK(FUNC(frame_header)(ctx, rw, ¤t->frame_header));
|
CHECK(FUNC(frame_header)(ctx, rw, ¤t->frame_header));
|
||||||
|
|
||||||
for (int t = 0; t < priv->num_tiles; t++) {
|
for (int t = 0; t < priv->num_tiles; t++) {
|
||||||
us(32, tile_size[t], 10, MAX_UINT_BITS(32), 1, t);
|
us(32, tile_size[t], 10, MAX_INT_BITS(32), 1, t);
|
||||||
|
|
||||||
CHECK(FUNC(tile)(ctx, rw, ¤t->tile[t],
|
CHECK(FUNC(tile)(ctx, rw, ¤t->tile[t],
|
||||||
t, current->tile_size[t]));
|
t, current->tile_size[t]));
|
||||||
|
|||||||
Reference in New Issue
Block a user