]> git.sesse.net Git - ffmpeg/commitdiff
qdm2: Fix data type used in multiplication.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 30 Dec 2012 02:13:30 +0000 (03:13 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 Feb 2013 18:56:04 +0000 (19:56 +0100)
Avoid unintended truncation.
Fixes CID700555

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/qdm2.c

index ca2aab7b56bfb6d0bac7bd5b5d3f8318d321c13d..9bc072014094ea71dae06ae26e16c93e51fdde56 100644 (file)
@@ -685,7 +685,7 @@ static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_arra
                     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++)