diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2014-06-09 08:09:49 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-09 15:24:51 +0200 |
commit | f341340552e2b70868a71aa55d3aebf3a27acc6d (patch) | |
tree | 101cc67273e65d94badbff5a2596abce86e11972 /libswresample/resample.c | |
parent | 637093a2db53614ab684461f0cf8e642b755e6ee (diff) | |
download | ffmpeg-f341340552e2b70868a71aa55d3aebf3a27acc6d.tar.gz |
swr: handle 64bit overflow check in multiple_resample().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r-- | libswresample/resample.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c index a657a0394e..af76aa2483 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -335,9 +335,11 @@ static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, A int i, ret= -1; int av_unused mm_flags = av_get_cpu_flags(); int need_emms= 0; + int64_t max_src_size = (INT64_MAX >> (c->phase_shift+1)) / c->src_incr; if (c->compensation_distance) dst_size = FFMIN(dst_size, c->compensation_distance); + src_size = FFMIN(src_size, max_src_size); for(i=0; i<dst->ch_count; i++){ #if HAVE_MMXEXT_INLINE |