1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/dxv: Fix type in get_opcodes()

Found by code review related to CID1604386 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e5af1c6e91)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-07-05 02:21:44 +02:00
parent f12e4ea885
commit 2f0931a418
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -440,7 +440,7 @@ static int get_opcodes(GetByteContext *gb, uint32_t *table, uint8_t *dst, int op
size_in_bits = bytestream2_get_le32(gb);
endoffset = ((size_in_bits + 7) >> 3) - 4;
if (endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset)
if ((int)endoffset <= 0 || bytestream2_get_bytes_left(gb) < endoffset)
return AVERROR_INVALIDDATA;
offset = endoffset;