ofz#35504 clamp input values in cgm filter
Change-Id: I96712b8dc8f8eaad3fb8fa6710d0f07fff61b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118137 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -109,7 +109,12 @@ bool CGM::ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rAng
|
||||
|
||||
static bool useless(double value)
|
||||
{
|
||||
return std::isnan(value) || std::isinf(value);
|
||||
if (!std::isfinite(value))
|
||||
return true;
|
||||
int exp;
|
||||
std::frexp(value, &exp);
|
||||
const int maxbits = sizeof(tools::Long) * 8;
|
||||
return exp > maxbits;
|
||||
}
|
||||
|
||||
void CGM::ImplDoClass4()
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user