[FFmpeg-cvslog] af_asyncts: avoid overflow in out_size with large delta values

Justin Ruggles git at videolan.org
Mon Jul 30 23:32:23 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sat Jul 28 13:12:38 2012 -0400| [be51e589cdf84d75e865cec31e722a36332a64f9] | committer: Justin Ruggles

af_asyncts: avoid overflow in out_size with large delta values

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be51e589cdf84d75e865cec31e722a36332a64f9
---

 libavfilter/af_asyncts.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index 5a12a6f..21850dd 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -186,7 +186,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
 
     if (labs(delta) > s->min_delta) {
         av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
-        out_size += delta;
+        out_size = av_clipl_int32((int64_t)out_size + delta);
     } else {
         if (s->resample) {
             int comp = av_clip(delta, -s->max_comp, s->max_comp);



More information about the ffmpeg-cvslog mailing list