1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/ivi: Check luma/chroma mb_size

Fixes: shift exponent -1 is negative
Fixes: 429011224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5031059358285824

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:
Michael Niedermayer
2025-07-15 23:28:09 +02:00
parent 2d72bf6fe0
commit c0f1c3e185

View File

@ -994,9 +994,11 @@ static int decode_band(IVI45DecContext *ctx,
for (t = 0; t < band->num_tiles; t++) { for (t = 0; t < band->num_tiles; t++) {
tile = &band->tiles[t]; tile = &band->tiles[t];
if (tile->mb_size != band->mb_size) { if (tile->mb_size != band->mb_size ||
av_log(avctx, AV_LOG_ERROR, "MB sizes mismatch: %d vs. %d\n", ctx->planes[0].bands[0].mb_size < band->mb_size
band->mb_size, tile->mb_size); ) {
av_log(avctx, AV_LOG_ERROR, "MB sizes mismatch: %d vs. %d vs. %d\n",
band->mb_size, tile->mb_size, ctx->planes[0].bands[0].mb_size);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
tile->is_empty = get_bits1(&ctx->gb); tile->is_empty = get_bits1(&ctx->gb);