1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/osq: use unsigned for decorrelation

Fixes: signed integer overflow: 1205469696 + 1901074655 cannot be represented in type 'int'
Fixes: 70773/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5419594888577024

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:
Michael Niedermayer 2024-09-19 22:03:37 +02:00
parent f27c8b04d3
commit e9f588af95
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -342,7 +342,7 @@ static int do_decode(AVCodecContext *avctx, AVFrame *frame, int decorrelate, int
if (nb_channels == 2 && ch == 1) {
if (decorrelate)
dst[n] += s->decode_buffer[0][OFFSET+n];
dst[n] += (unsigned)s->decode_buffer[0][OFFSET+n];
}
if (downsample)