Message ID | 20230416164830.15664-10-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 8f0e200a12c25e288acd31eff0a5000bc74aa34e |
Headers | show |
Series | [FFmpeg-devel,01/11] avcodec/adpcm: Fix integer overflow in intermediate in ADPCM_XMD | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index 6ea9e2c0650..eff6587404d 100644 --- a/libavcodec/dpcm.c +++ b/libavcodec/dpcm.c @@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (n & 0x80) s->sample[idx] = sign_extend((n & 0x7f) << 9, 16); else - s->sample[idx] += s->scale * wady_table[n & 0x7f]; + s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f]; *output_samples++ = av_clip_int16(s->sample[idx]); idx ^= stereo; }
Fixes: signed integer overflow: -2147375930 + -133875 cannot be represented in type 'int' Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WADY_DPCM_fuzzer-6703727013920768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/dpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)