aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-06-30 01:24:20 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-07-22 17:05:47 +0200
commitf9b29451e422e672595e95eefd03879a4398a1f6 (patch)
tree321bce6da0615146ce8b79730bbabd6fcd18ef05 /libavcodec
parent167b4f56f187edafd94fa2e706897ac3bb450511 (diff)
downloadffmpeg-f9b29451e422e672595e95eefd03879a4398a1f6.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/rka.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rka.c b/libavcodec/rka.c
index d56f4faee4..7646d776be 100644
--- a/libavcodec/rka.c
+++ b/libavcodec/rka.c
@@ -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) {