diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-03 13:58:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-03 20:46:48 +0100 |
commit | 7cca1dc560aeceb430ef6a0db2f7823e717ee585 (patch) | |
tree | e56305bcaf0eb3b9c8a0b5d4802eec75a8048a50 /sw | |
parent | bd74993aef9b30ca42810543d8b8bf13490ee9ce (diff) |
ofz#4042 Integer-overflow
Change-Id: Iccd150e8d704e065b8a3e060a1c9a2b6310e3641
Reviewed-on: https://gerrit.libreoffice.org/44265
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlmeta.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 0d75cfc9b606..b4d5d8189b9d 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -23,6 +23,7 @@ #include <xmloff/xmlmetai.hxx> #include <xmloff/xmlmetae.hxx> #include <editeng/langitem.hxx> +#include <o3tl/safeint.hxx> #include <xmloff/xmluconv.hxx> #include <xmloff/nmspmap.hxx> #include <docstat.hxx> @@ -148,7 +149,7 @@ void SwXMLImport::SetStatistics( if( nTokens & XML_TOK_META_STAT_PARA ) nProgressReference = (sal_Int32)aDocStat.nPara; else if ( nTokens & XML_TOK_META_STAT_PAGE ) - nProgressReference = 10 * (sal_Int32)aDocStat.nPage; + o3tl::checked_multiply<sal_Int32>(aDocStat.nPage, 10, nProgressReference); ProgressBarHelper* pProgress = GetProgressBarHelper(); pProgress->SetReference( nProgressReference + 3*PROGRESS_BAR_STEP ); pProgress->SetValue( 0 ); |