summaryrefslogtreecommitdiff
path: root/libavcodec/dxv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dxv.c')
-rw-r--r--libavcodec/dxv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index ae79de981f..8d5e4b1c6c 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -745,7 +745,7 @@ static int dxv_decompress_cocg(DXVContext *ctx, GetByteContext *gb,
int skip0, skip1, oi0 = 0, oi1 = 0;
int ret, state0 = 0, state1 = 0;
- if (op_offset < 12)
+ if (op_offset < 12 || op_offset - 12 > bytestream2_get_bytes_left(gb))
return AVERROR_INVALIDDATA;
dst = tex_data;