mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
df91af140c
commit
470700bc96
@ -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) {
|
if (plane < s->nb_planes && x < avctx->width) {
|
||||||
int run = (y + 1) * avctx->width - x;
|
int run = (y + 1) * avctx->width - x;
|
||||||
if (bits_per_plane == 8)
|
if (bits_per_plane == 8)
|
||||||
|
Loading…
Reference in New Issue
Block a user