diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-05 13:11:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-06 12:40:51 +0100 |
commit | f19d3fe8e95101f3e06a790d9a274b3e4f73f5b2 (patch) | |
tree | b554a02a780f354f1e5e7da2027bcc93469d38fb | |
parent | 0819598b008ebf6940a3638f15a96516d99f0099 (diff) | |
download | ffmpeg-f19d3fe8e95101f3e06a790d9a274b3e4f73f5b2.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index f32e4c2931..8e026ba7c4 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -473,7 +473,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); } |