aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-28 21:57:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-28 21:57:11 +0100
commit5705dc527687fd84d94c934169b6bd753459744f (patch)
tree77cac834107115e21b3cacd708622d69bf87ba14
parent5f1ea0bfc53ac221abf312aeb79cb693f3a6e07d (diff)
downloadffmpeg-5705dc527687fd84d94c934169b6bd753459744f.tar.gz
avutil/imgutils: correctly check for negative SAR components
These could trigger assert failures previously Found-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavutil/imgutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 07b494c38a..a8bc18d025 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -245,7 +245,7 @@ int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar)
{
int64_t scaled_dim;
- if (!sar.den)
+ if (sar.den <= 0 || sar.num < 0)
return AVERROR(EINVAL);
if (!sar.num || sar.num == sar.den)