diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-29 17:52:34 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-29 17:52:34 +0300 |
commit | 827af242308e4670f7e2c9a9607d40c9bfe23b27 (patch) | |
tree | 8b975bd31d0db5a9dfb5d1bdaf84efdc361465fe /libavutil/rational.c | |
parent | db0a52d611d7319c8a1186829a50e29b9dfed63b (diff) |
avutil/rational: Check that av_reduce() returns values within the requested max
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/rational.c')
-rw-r--r-- | libavutil/rational.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |