[FFmpeg-cvslog] avutil/rational: Check that av_reduce() returns values within the requested max

Michael Niedermayer git at videolan.org
Mon Dec 29 16:07:39 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 29 15:52:34 2014 +0100| [827af242308e4670f7e2c9a9607d40c9bfe23b27] | committer: Michael Niedermayer

avutil/rational: Check that av_reduce() returns values within the requested max

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/rational.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/rational.c b/libavutil/rational.c
index 55a8dd5..594a6f8 100644
--- a/libavutil/rational.c
+++ b/libavutil/rational.c
@@ -69,6 +69,7 @@ int av_reduce(int *dst_num, int *dst_den,
         den = next_den;
     }
     av_assert2(av_gcd(a1.num, a1.den) <= 1U);
+    av_assert2(a1.num <= max && a1.den <= max);
 
     *dst_num = sign ? -a1.num : a1.num;
     *dst_den = a1.den;



More information about the ffmpeg-cvslog mailing list