diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-26 10:45:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-27 12:28:30 +0200 |
commit | 7ee3953ce53f8259c5058a32bad6ad76adbf7151 (patch) | |
tree | e1aab3047d0e0147c5bc2bf2be8cb78637e9537a /emfio | |
parent | 6b760dc4bbb496496982d6d7aaa3701903bc3c11 (diff) |
ofz#3819 Integer-overflow
Change-Id: Ic45692152b039c0ee2f5659d7739c3a2517c5e83
Reviewed-on: https://gerrit.libreoffice.org/43876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 349f686f4ea9..b6de61d1f6bc 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -514,8 +514,9 @@ namespace emfio // must later be made portable in SV (KA 1996-02-08) Size aFontSize = ImplMap (rFont.GetFontSize(), false); - if( aFontSize.Height() < 0 ) - aFontSize.Height() *= -1; + const auto nHeight = aFontSize.Height(); + if (nHeight < 0) + aFontSize.Height() = o3tl::saturating_toggle_sign(nHeight); rFont.SetFontSize( aFontSize ); |