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