Message ID | 20190619215422.8360-3-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | a3bd4b260eb9f0d5817f9b3d672844f127c51a0b |
Headers | show |
On Wed, Jun 19, 2019 at 11:54:22PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: -346039050 * 8 cannot be represented in type 'int' > Fixes: 15283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5692700268953600 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/alsdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply [...]
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index b7ce5c7844..e50a287f19 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1033,7 +1033,7 @@ static int decode_block(ALSDecContext *ctx, ALSBlockData *bd) if (*bd->shift_lsbs) for (smp = 0; smp < bd->block_length; smp++) - bd->raw_samples[smp] <<= *bd->shift_lsbs; + bd->raw_samples[smp] = (unsigned)bd->raw_samples[smp] << *bd->shift_lsbs; return 0; }
Fixes: signed integer overflow: -346039050 * 8 cannot be represented in type 'int' Fixes: 15283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5692700268953600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)