Skip to content
Snippets Groups Projects
Unverified Commit f3ac9f6f authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/wnv1: Check for width =1

The decoder only outputs pixels for width >1 images, fail early

Fixes: Timeout
Fixes: 48298/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WNV1_fuzzer-6198626319204352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg


Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d98d5a43)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4b3ff3ce
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
static VLC_TYPE code_table[1 << CODE_VLC_BITS][2];
if (avctx->width <= 1)
return AVERROR_INVALIDDATA;
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
code_vlc.table = code_table;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment