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

ofz#5015 Integer-overflow

Change-Id: Id5b8e3b66b5b7b0f762c72a3e66e6c425011301c
Reviewed-on: https://gerrit.libreoffice.org/47534Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2d771c81
......@@ -2592,11 +2592,11 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
bool bHori = nWhichLine == SvxBoxItemLine::TOP ||
nWhichLine == SvxBoxItemLine::BOTTOM;
// One Pixel becomes a hairline (is prettier)
long nWidthL = (long)pExpr->GetNumber();
if( nWidthL > 1 )
double fWidth = pExpr->GetNumber();
if (fWidth > 1.0 && fWidth < SAL_MAX_INT32/2.0)
{
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
long nPWidth = bHori ? 0 : fWidth;
long nPHeight = bHori ? fWidth : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
......
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