mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
avcodec/clearvideo: fix invalid shift in tile size check
Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 15631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5690110605000704 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 5dc94924d0fbdedba4356c21ec7de0347b8e4757) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2736e0875c
commit
34479be7a6
@ -665,7 +665,7 @@ static av_cold int clv_decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
c->tile_shift = av_log2(c->tile_size);
|
c->tile_shift = av_log2(c->tile_size);
|
||||||
if (1 << c->tile_shift != c->tile_size) {
|
if (1U << c->tile_shift != c->tile_size) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Tile size: %d, is not power of 2.\n", c->tile_size);
|
av_log(avctx, AV_LOG_ERROR, "Tile size: %d, is not power of 2.\n", c->tile_size);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user