Kaydet (Commit) 222dc6ef authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#7244 Integer overflow

Change-Id: Ied769220da5512f9fa81a8ee46f724de33dae543
Reviewed-on: https://gerrit.libreoffice.org/52294Tested-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 3af6be55
......@@ -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);
}
......
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