[FFmpeg-devel] [PATCH 3/3] avcodec/dxv: Check for end of input in dxv_decompress_dxt5()
Michael Niedermayer
michael at niedermayer.cc
Sat Sep 30 19:54:07 EEST 2017
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 at niedermayer.cc>
---
libavcodec/dxv.c | 2 ++
1 file changed, 2 insertions(+)
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;
--
2.14.2
More information about the ffmpeg-devel
mailing list