aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-05 13:11:23 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-06 02:08:26 +0100
commit4b77e0a33ee73da1d1c0f4182b4c81ac0450c87a (patch)
tree7a1ad13cbbec6e08c95b5a17553d1e24fa093f21
parentc108dfc6ccd81002dc5d9dd3e7dc996eb3df4d9a (diff)
downloadffmpeg-4b77e0a33ee73da1d1c0f4182b4c81ac0450c87a.tar.gz
avcodec/wmaprodec: Fix overflow of cutoff
Fixes: 129ca3e28d73af7b1e24a9d4118e7a2d/signal_sigabrt_7ffff6ae7cc9_836_762b310fc3ef6087bd7771e5d8e90b9b.asf Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0c56f8303e676556ea09bfac73d881c6c9057259) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wmaprodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index a94da0f67c..fe3adb2df0 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -477,7 +477,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
/** calculate subwoofer cutoff values */
for (i = 0; i < num_possible_block_sizes; i++) {
int block_size = s->samples_per_frame >> i;
- int cutoff = (440*block_size + 3 * (s->avctx->sample_rate >> 1) - 1)
+ int cutoff = (440*block_size + 3LL * (s->avctx->sample_rate >> 1) - 1)
/ s->avctx->sample_rate;
s->subwoofer_cutoffs[i] = av_clip(cutoff, 4, block_size);
}