summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-30 18:54:07 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-10-04 02:16:11 +0200
commitd662143f064636f11d92083cd9aa4f907cf97d59 (patch)
treeff96368cf21cdb2792a490c02e41a507d5130d25 /libavcodec
parent44874b4f5ec2c605c70393573b9d85540ebc2d81 (diff)
avcodec/dxv: Check for end of input in dxv_decompress_dxt5()
Fixes: Timeout Fixes: 3291/clusterfuzz-testcase-4630024655208448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dxv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 6f3c075d06..529e211258 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -197,6 +197,8 @@ static int dxv_decompress_dxt5(AVCodecContext *avctx)
AV_WL32(ctx->tex_data + 4 * pos, prev);
pos++;
} else {
+ if (bytestream2_get_bytes_left(gbc) < 1)
+ return AVERROR_INVALIDDATA;
if (state == 0) {
value = bytestream2_get_le32(gbc);
state = 16;