diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-24 13:40:35 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-08 17:24:58 +0300 |
commit | dd9e6d077ea3259cc6c1896334bbbc7f948979b7 (patch) | |
tree | c5d5b4c6a6a8578227a133b40ba423827b7843f9 /libavcodec/dxv.c | |
parent | c371e50b4f125361eb183ac3c226f4044ae64b08 (diff) |
avcodec/dxv: Subtract 12 earlier in dxv_decompress_cocg()
the data_start is after reading 12 bytes and if its subtracted
at the very end the intermediate might overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dxv.c')
-rw-r--r-- | libavcodec/dxv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index df63006d04..b51d6393b0 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -783,7 +783,7 @@ static int dxv_decompress_cocg(DXVContext *ctx, GetByteContext *gb, return ret; } - bytestream2_seek(gb, data_start + op_offset + skip0 + skip1 - 12, SEEK_SET); + bytestream2_seek(gb, data_start - 12 + op_offset + skip0 + skip1, SEEK_SET); return 0; } |