mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()
Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int' Fixes: 14107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5694078680825856 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 f4a1b8d409639b2394589efe20ad55410cce391c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
af511f8a3f
commit
043ccb3a19
@ -674,8 +674,8 @@ static inline void tm2_update_block(TM2Context *ctx, AVFrame *pic, int bx, int b
|
|||||||
/* update chroma */
|
/* update chroma */
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
U[i] = Uo[i] + GET_TOK(ctx, TM2_UPD);
|
U[i] = Uo[i] + (unsigned)GET_TOK(ctx, TM2_UPD);
|
||||||
V[i] = Vo[i] + GET_TOK(ctx, TM2_UPD);
|
V[i] = Vo[i] + (unsigned)GET_TOK(ctx, TM2_UPD);
|
||||||
}
|
}
|
||||||
U += Ustride;
|
U += Ustride;
|
||||||
V += Vstride;
|
V += Vstride;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user