diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-03 10:02:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-03 12:22:42 +0200 |
commit | 222dc6ef01ae56f9c77d225f96a99a93f841e809 (patch) | |
tree | 97e66047a4dbf3f8ea9eab2ebe4522b63393e946 /vcl | |
parent | 3af6be55ae1dabb1b72cbb4c57cca33c28b347f8 (diff) |
ofz#7244 Integer overflow
Change-Id: Ied769220da5512f9fa81a8ee46f724de33dae543
Reviewed-on: https://gerrit.libreoffice.org/52294
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 'vcl')
-rw-r--r-- | vcl/source/font/fontselect.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/font/fontselect.cxx b/vcl/source/font/fontselect.cxx index 927e1106c5b6..8e62cf080808 100644 --- a/vcl/source/font/fontselect.cxx +++ b/vcl/source/font/fontselect.cxx @@ -18,6 +18,7 @@ */ #include <sal/config.h> +#include <o3tl/safeint.hxx> #include <PhysicalFontFace.hxx> #include <svdata.hxx> @@ -62,9 +63,9 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont // normalize width and height if( mnHeight < 0 ) - mnHeight = -mnHeight; + mnHeight = o3tl::saturating_toggle_sign(mnHeight); if( mnWidth < 0 ) - mnWidth = -mnWidth; + mnWidth = o3tl::saturating_toggle_sign(mnWidth); } |