mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-19 09:02:26 +02:00
avcodec/ralf: Fix integer overflow in apply_lpc()
Fixes: signed integer overflow: 2147482897 + 2048 cannot be represented in type 'int' Fixes: 19240/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5743240326414336 Fixes: 19869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5150136636538880 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 fd313d8cf8368918882b6de0880e44ae25cc7394) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
af1bfe5bc3
commit
9f30a1694c
@ -330,7 +330,7 @@ static void apply_lpc(RALFContext *ctx, int ch, int length, int bits)
|
|||||||
acc = (acc + bias - 1) >> ctx->filter_bits;
|
acc = (acc + bias - 1) >> ctx->filter_bits;
|
||||||
acc = FFMAX(acc, min_clip);
|
acc = FFMAX(acc, min_clip);
|
||||||
} else {
|
} else {
|
||||||
acc = (acc + bias) >> ctx->filter_bits;
|
acc = ((unsigned)acc + bias) >> ctx->filter_bits;
|
||||||
acc = FFMIN(acc, max_clip);
|
acc = FFMIN(acc, max_clip);
|
||||||
}
|
}
|
||||||
audio[i] += acc;
|
audio[i] += acc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user