mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-24 07:46:56 +00:00
avcodec/iff: Fix several integer overflows
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int32_t' (aka 'int')
Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5764066459254784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7a92147f87
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6ce730d39e
commit
4a41de80ed
@ -1305,11 +1305,10 @@ static void decode_delta_d(uint8_t *dst,
|
||||
opcode--;
|
||||
}
|
||||
} else {
|
||||
opcode = -opcode;
|
||||
while (opcode && bytestream2_get_bytes_left(&gb) > 0) {
|
||||
bytestream2_put_be32(&pb, bytestream2_get_be32(&gb));
|
||||
bytestream2_skip_p(&pb, pitch - 4);
|
||||
opcode--;
|
||||
opcode++;
|
||||
}
|
||||
}
|
||||
entries--;
|
||||
|
Loading…
Reference in New Issue
Block a user