Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-02 00:16:19 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-02 17:45:24 +0300
commitb3dab0f894d3ad3da48cec0876d3bd65c8773e9f (patch)
tree16fbe7e6e8682b0945c3a5040450081baa110220 /libavcodec/msvideo1.c
parentd6b647e22138321decb7b08338dd3ae17f7a1cc3 (diff)
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> (cherry picked from commit 953bd58861ad933e614510140b05a61e3d1375be) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/msvideo1.c')
-rw-r--r--libavcodec/msvideo1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index c53ca826cb..3e51e3cfe9 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -63,6 +63,9 @@ static av_cold int msvideo1_decode_init(AVCodecContext *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 */
if (s->avctx->bits_per_coded_sample == 8) {
s->mode_8bit = 1;