Message ID | 20230921180912.10733-2-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | f3c986200d7f4ec934c480b09aa8a13554da032d |
Headers | show |
Series | [FFmpeg-devel,1/6] avcodec/osq: Check that pkt_offset does not exceed pkt size | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Thu, Sep 21, 2023 at 08:09:08PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 148676193 - -2006512262 cannot be represented in type 'int' > Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5963163952349184 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/wavarc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply the 3 wavarc patches from this set [...]
diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c index b954e8800cd..48c673fdea4 100644 --- a/libavcodec/wavarc.c +++ b/libavcodec/wavarc.c @@ -154,11 +154,11 @@ static void do_stereo(WavArcContext *s, int ch, int correlated, int len) } else { if (correlated) { for (int n = 0; n < nb_samples; n++) - s->samples[1][n + len] += s->samples[0][n + len]; + s->samples[1][n + len] += (unsigned)s->samples[0][n + len]; } for (int n = 0; n < len; n++) { s->pred[0][n] = s->samples[1][nb_samples + n]; - s->pred[1][n] = s->pred[0][n] - s->samples[0][nb_samples + n]; + s->pred[1][n] = s->pred[0][n] - (unsigned)s->samples[0][nb_samples + n]; } } }
Fixes: signed integer overflow: 148676193 - -2006512262 cannot be represented in type 'int' Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5963163952349184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/wavarc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)