mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-23 23:36:57 +00:00
avcodec/kgv1dec: Check that there is enough input for maximum RLE compression
Fixes: Timeout
Fixes: 4271/clusterfuzz-testcase-4676667768307712
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 3aad94bf2b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
42b9df5a98
commit
857c5fa976
@ -62,6 +62,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
||||
h = (buf[1] + 1) * 8;
|
||||
buf += 2;
|
||||
|
||||
if (avpkt->size < 2 + w*h / 513)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (w != avctx->width || h != avctx->height) {
|
||||
av_freep(&c->frame_buffer);
|
||||
av_freep(&c->last_frame_buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user