Commit 4daec0c6 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dxv: Check remaining space in CHECKPOINT()

Fixes: Timeout (77sec -> 1sec)
Fixes: 13407/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5093143018471424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0ac3befd
......@@ -256,6 +256,8 @@ static int decompress_texture_thread(AVCodecContext *avctx, void *arg,
#define CHECKPOINT(x) \
do { \
if (state == 0) { \
if (bytestream2_get_bytes_left(gbc) < 4) \
return AVERROR_INVALIDDATA; \
value = bytestream2_get_le32(gbc); \
state = 16; \
} \
......
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