You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/msvideo1: Check for too small dimensions
Such low resolution would result in empty output as a minimum of 4x4 is needed We could also check for multiple of 4 dimensions but that is not needed Fixes: Timeout Fixes: 11191/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSVIDEO1_fuzzer-5739529588178944 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:
@@ -62,6 +62,9 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
|
|
||||||
|
if (avctx->width < 4 || avctx->height < 4)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
/* figure out the colorspace based on the presence of a palette */
|
/* figure out the colorspace based on the presence of a palette */
|
||||||
if (s->avctx->bits_per_coded_sample == 8) {
|
if (s->avctx->bits_per_coded_sample == 8) {
|
||||||
s->mode_8bit = 1;
|
s->mode_8bit = 1;
|
||||||
|
Reference in New Issue
Block a user