mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avcodec/wcmv: check remaining space vs. blocks
Fixes: Timeout (18sec -> 7sec) Fixes: 14835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5646714897170432 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
d5a6b390ce
commit
dd8720045c
@ -154,6 +154,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
bytestream2_seek(&gb, 2, SEEK_SET);
|
bytestream2_seek(&gb, 2, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bytestream2_get_bytes_left(&gb) < 8LL * blocks)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (s->prev_frame->data[0]) {
|
if (s->prev_frame->data[0]) {
|
||||||
ret = av_frame_copy(frame, s->prev_frame);
|
ret = av_frame_copy(frame, s->prev_frame);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user