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>
(cherry picked from commit dd9e6d077ea3259cc6c1896334bbbc7f948979b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-09-24 12:40:35 +02:00
parent 97244c8c62
commit 39183277ef

View File

@ -781,7 +781,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;
}