Commit eb504922 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dxv: Check remaining bytes in dxv_decompress_raw()

Fixes: Timeout
Fixes: 2006/clusterfuzz-testcase-minimized-5766515037044736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3d402632
......@@ -335,6 +335,9 @@ static int dxv_decompress_raw(AVCodecContext *avctx)
DXVContext *ctx = avctx->priv_data;
GetByteContext *gbc = &ctx->gbc;
if (bytestream2_get_bytes_left(gbc) < ctx->tex_size)
return AVERROR_INVALIDDATA;
bytestream2_get_buffer(gbc, ctx->tex_data, ctx->tex_size);
return 0;
}
......
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