From 827af242308e4670f7e2c9a9607d40c9bfe23b27 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 29 Dec 2014 15:52:34 +0100 Subject: [PATCH] avutil/rational: Check that av_reduce() returns values within the requested max Signed-off-by: Michael Niedermayer --- libavutil/rational.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/rational.c b/libavutil/rational.c index 55a8dd5897..594a6f81e6 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;