mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
avcodec/clearvideo: Check for 0 tile_shift
Fixes: shift exponent -1 is negative Fixes: 33401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5908683596890112 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 63e75e09aef5836330a2786f0a9229ed82239e6b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3f81371bd4
commit
a6bd1bdd12
@ -722,8 +722,8 @@ static av_cold int clv_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
c->tile_shift = av_log2(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);
|
||||
if (1U << c->tile_shift != c->tile_size || c->tile_shift < 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Tile size: %d, is not power of 2 > 1\n", c->tile_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user