Commit 0269fb11 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()

Otherwise the exponent could eventually underflow
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 107db5ab
......@@ -181,6 +181,10 @@ static av_always_inline SoftFloat av_sqrt_sf(SoftFloat val)
val.mant >>= 1;
val.exp = (val.exp >> 1) + 1;
if (val.exp < MIN_EXP) {
val.exp = MIN_EXP;
val.mant= 0;
}
}
return val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment