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

ofz#4783: Integer-overflow

Change-Id: I44f5c71db2a2da00da510673ee6a596582c8e3b9
üst 9a72cf9d
......@@ -24,6 +24,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <comphelper/string.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ustrbuf.hxx>
#include <svx/svxids.hrc>
#if OSL_DEBUG_LEVEL > 0
......@@ -3639,7 +3640,7 @@ void SwHTMLParser::NewFontAttr( HtmlTokenId nToken )
sal_Int32 nSSize;
if( '+' == rOption.GetString()[0] ||
'-' == rOption.GetString()[0] )
nSSize = nBaseSize + rOption.GetSNumber();
nSSize = o3tl::saturating_add<sal_Int32>(nBaseSize, rOption.GetSNumber());
else
nSSize = (sal_Int32)rOption.GetNumber();
......
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