[FFmpeg-cvslog] avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Tue Feb 21 01:42:55 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 21 00:11:19 2017 +0100| [e8a3498f2452ba2be605b1ffb5974143095aacf1] | committer: Michael Niedermayer
avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768 cannot be represented in type 'int'
Fixes: 629/clusterfuzz-testcase-6697457381539840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8a3498f2452ba2be605b1ffb5974143095aacf1
---
libavcodec/dca_xll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index 435f84e..3dfde6b 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -717,10 +717,10 @@ static void chs_assemble_msbs_lsbs(DCAXllDecoder *s, DCAXllChSet *c, int band)
int32_t *lsb = b->lsb_sample_buffer[ch];
int adj = b->bit_width_adjust[ch];
for (n = 0; n < nsamples; n++)
- msb[n] = msb[n] * (1 << shift) + (lsb[n] << adj);
+ msb[n] = msb[n] * (SUINT)(1 << shift) + (lsb[n] << adj);
} else {
for (n = 0; n < nsamples; n++)
- msb[n] = msb[n] * (1 << shift);
+ msb[n] = msb[n] * (SUINT)(1 << shift);
}
}
}
More information about the ffmpeg-cvslog
mailing list