mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/apedec: Fixes integer overflow of res+*data in do_apply_filter()
Fixes: signed integer overflow: 7400 + 2147482786 cannot be represented in type 'int' Fixes: 18405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5708834760294400 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 dc3f327e7403a34c88a900f0b8de55b4afd7cf6c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
17d5c21b3d
commit
6b430f066b
@ -1268,7 +1268,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
|
||||
f->adaptcoeffs - order,
|
||||
order, APESIGN(*data));
|
||||
res = (int)(res + (1U << (fracbits - 1))) >> fracbits;
|
||||
res += *data;
|
||||
res += (unsigned)*data;
|
||||
*data++ = res;
|
||||
|
||||
/* Update the output history */
|
||||
|
Loading…
x
Reference in New Issue
Block a user