mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
44874b4f5e
commit
d662143f06
|
@ -197,6 +197,8 @@ static int dxv_decompress_dxt5(AVCodecContext *avctx)
|
||||||
AV_WL32(ctx->tex_data + 4 * pos, prev);
|
AV_WL32(ctx->tex_data + 4 * pos, prev);
|
||||||
pos++;
|
pos++;
|
||||||
} else {
|
} else {
|
||||||
|
if (bytestream2_get_bytes_left(gbc) < 1)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (state == 0) {
|
if (state == 0) {
|
||||||
value = bytestream2_get_le32(gbc);
|
value = bytestream2_get_le32(gbc);
|
||||||
state = 16;
|
state = 16;
|
||||||
|
|
Loading…
Reference in New Issue