mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/softfloat: Check for MIN_EXP in av_sqrt_sf()
Otherwise the exponent could eventually underflow Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
107db5abf3
commit
0269fb11e3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue