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:
Caolán McNamara
2021-06-30 21:45:35 +02:00
parent 8ed2142789
commit 5e86537053
2 changed files with 6 additions and 1 deletions
+6 -1
View File
@@ -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.