sw/source/filter/html/svxcss1.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
New commits: commit b0486259aa2a1a839f5e46522b73ae9f051e20eb Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 10 10:10:12 2018 +0000 ofz: Integer-overflow Change-Id: Iad8ebd0861a74399f6bb4a18aecf0de735a60b61 Reviewed-on: https://gerrit.libreoffice.org/47694 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 37c0a88df992..e442644271f2 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -2019,11 +2019,15 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr, break; case CSS1_PIXLENGTH: { - long nPWidth = (long)pExpr->GetNumber(); - long nPHeight = 0; - SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight ); - nIndent = (short)nPWidth; - bSet = true; + double fWidth = pExpr->GetNumber(); + if (fWidth < SAL_MAX_INT32/2.0 && fWidth > SAL_MIN_INT32/2.0) + { + long nPWidth = (long)fWidth; + long nPHeight = 0; + SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight ); + nIndent = (short)nPWidth; + bSet = true; + } } break; case CSS1_PERCENTAGE:
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits