[FFmpeg-cvslog] qdm2: avoid integer overflow
Vittorio Giovara
git at videolan.org
Sun Jan 18 02:23:36 CET 2015
ffmpeg | branch: release/2.4 | Vittorio Giovara <vittorio.giovara at gmail.com> | Wed Nov 12 19:10:44 2014 +0100| [e9aeaa6441f6fd18fc951d9737887dcf8a9584c0] | committer: Luca Barbato
qdm2: avoid integer overflow
CC: libav-stable at libav.org
Bug-Id: CID 700555
(cherry picked from commit 1f80742f49a9a4e846c9f099387881abc87150b2)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9aeaa6441f6fd18fc951d9737887dcf8a9584c0
---
libavcodec/qdm2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 94bda91..4718b34 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -730,7 +730,7 @@ static void fill_coding_method_array(sb_int8_array tone_level_idx,
for (j = 0; j < 64; j++)
acc += tone_level_idx_temp[ch][sb][j];
- multres = 0x66666667 * (acc * 10);
+ multres = 0x66666667LL * (acc * 10);
esp_40 = (multres >> 32) / 8 + ((multres & 0xffffffff) >> 31);
for (ch = 0; ch < nb_channels; ch++)
for (sb = 0; sb < 30; sb++)
More information about the ffmpeg-cvslog
mailing list