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>
release/7.1
Michael Niedermayer 6 months ago
parent 69dcd123f1
commit e5af1c6e91
  1. 2
      libavcodec/dxv.c

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

Loading…
Cancel
Save