Commit 470700bc authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pictordec: Error out if more than one plane is unused

Fixes: Timeout
Fixes: 9797/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5664441659031552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent df91af14
......@@ -236,6 +236,9 @@ static int decode_frame(AVCodecContext *avctx,
}
}
if (s->nb_planes - plane > 1)
return AVERROR_INVALIDDATA;
if (plane < s->nb_planes && x < avctx->width) {
int run = (y + 1) * avctx->width - x;
if (bits_per_plane == 8)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment