avcodec/rka: Fix integer overflow in decode_filter()

Fixes: signed integer overflow: 2147443649 + 65535 cannot be represented in type 'int'
Fixes: 60054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5095674572832768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-06-30 01:24:20 +02:00
parent 167b4f56f1
commit f9b29451e4
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 1 additions and 1 deletions

View File

@ -745,7 +745,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns
}
ctx->buf1[off] = sum - ctx->buf0[off + -1];
ctx->buf0[off] = sum;
m += FFABS(ctx->buf1[off]);
m += (unsigned)FFABS(ctx->buf1[off]);
}
}
if (ctx->cmode2 != 0) {