You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/rka: Fix signed integer overflow in decode_filter()
Fixes: signed integer overflow: -631553 * 32768 cannot be represented in type 'int' Fixes: 57814/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-4614661233573888 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:
@@ -737,7 +737,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns
|
|||||||
}
|
}
|
||||||
ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1];
|
ctx->buf0[off] = ctx->buf1[off] + ctx->buf0[off + -1];
|
||||||
} else {
|
} else {
|
||||||
val *= 1 << ctx->cmode;
|
val *= 1U << ctx->cmode;
|
||||||
sum += ctx->buf0[off + -1] + val;
|
sum += ctx->buf0[off + -1] + val;
|
||||||
switch (s->bps) {
|
switch (s->bps) {
|
||||||
case 16: sum = av_clip_int16(sum); break;
|
case 16: sum = av_clip_int16(sum); break;
|
||||||
|
Reference in New Issue
Block a user