Commit aeb4e435 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/txd: Check for input size against the header size.

Fixes: Timeout (21sec -> 80ms)
Fixes: 20673/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TXD_fuzzer-5177453863763968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 55e344ee
......@@ -43,6 +43,9 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int i, j;
int ret;
if (avpkt->size < 88)
return AVERROR_INVALIDDATA;
ff_texturedsp_init(&dxtc);
bytestream2_init(&gb, avpkt->data, avpkt->size);
......
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