Fixes: Timeout
Fixes: 12967/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5639021454163968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int nb_tiles = bytestream2_get_le16(gb);
int h = avctx->height - 1;
+ if ((avctx->width / 4 + 1) * (avctx->height / 4 + 1) < nb_tiles)
+ return;
+
for (int i = 0; i < nb_tiles; i++) {
int y = bytestream2_get_byte(gb);
int x = bytestream2_get_byte(gb);
int nb_tiles = bytestream2_get_le16(gb);
int h = avctx->height - 1;
+ if ((avctx->width / tile_width + 1) * (avctx->height / tile_height + 1) < nb_tiles)
+ return;
+
for (int i = 0; i < nb_tiles; i++) {
int y = bytestream2_get_byte(gb);
int x = bytestream2_get_byte(gb);