mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/rka: avoid negative value shift
Fixes: left shift of negative value -81 Fixes: 56061/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-4649758062149632 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:
parent
8874cfa2e1
commit
a5d4e7e3f9
|
@ -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 <<= ctx->cmode;
|
val *= 1 << 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;
|
||||||
|
|
Loading…
Reference in New Issue