Kaydet (Commit) abec3df5 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4725 Integer-overflow

Change-Id: I74e065b8ba00dc80559bb64cf1bdefa5f9f5b480
üst d77d0d8e
......@@ -2296,10 +2296,18 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
break;
case CSS1_PIXLENGTH:
{
long nPWidth = 0;
nMargin = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nMargin );
bSetThis = true;
auto fMargin = pExpr->GetNumber();
if (fMargin < SAL_MAX_INT32/2 && fMargin > SAL_MIN_INT32/2)
{
nMargin = (long)fMargin;
long nPWidth = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nMargin );
bSetThis = true;
}
else
{
SAL_WARN("sw.html", "out-of-size pxlength: " << fMargin);
}
}
break;
case CSS1_PERCENTAGE:
......
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