mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/iff: Use signed count
This is more a style fix than a bugfix (CID1604392 Overflowed constant)
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cfe66dfebb
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
007191cdc4
commit
94b3f8f30b
@ -583,7 +583,7 @@ static int decode_byterun2(uint8_t *dst, int height, int line_size,
|
|||||||
GetByteContext *gb)
|
GetByteContext *gb)
|
||||||
{
|
{
|
||||||
GetByteContext cmds;
|
GetByteContext cmds;
|
||||||
unsigned count;
|
int count;
|
||||||
int i, y_pos = 0, x_pos = 0;
|
int i, y_pos = 0, x_pos = 0;
|
||||||
|
|
||||||
if (bytestream2_get_be32(gb) != MKBETAG('V', 'D', 'A', 'T'))
|
if (bytestream2_get_be32(gb) != MKBETAG('V', 'D', 'A', 'T'))
|
||||||
@ -591,7 +591,7 @@ static int decode_byterun2(uint8_t *dst, int height, int line_size,
|
|||||||
|
|
||||||
bytestream2_skip(gb, 4);
|
bytestream2_skip(gb, 4);
|
||||||
count = bytestream2_get_be16(gb) - 2;
|
count = bytestream2_get_be16(gb) - 2;
|
||||||
if (bytestream2_get_bytes_left(gb) < count)
|
if (count < 0 || bytestream2_get_bytes_left(gb) < count)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bytestream2_init(&cmds, gb->buffer, count);
|
bytestream2_init(&cmds, gb->buffer, count);
|
||||||
|
Loading…
Reference in New Issue
Block a user