summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableManager.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-06 09:00:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-06 12:44:46 +0200
commit83f12a2d4e410014c70844085f19190a50e83429 (patch)
tree90c9ac9ffd40fd7ecd6e23c5b757caa10da8c3e1 /writerfilter/source/dmapper/DomainMapperTableManager.cxx
parentd409ea98b36ff82285ed1ab182e29f203b63d2af (diff)
ofz#10228 Integer-overflow
Change-Id: I09cb2e8f4af7d34c32accf2590695799d0613d62 Reviewed-on: https://gerrit.libreoffice.org/60070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableManager.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 10c252c764b8..c473eccaf198 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <o3tl/numeric.hxx>
+#include <o3tl/safeint.hxx>
#include <ooxml/resourceids.hxx>
#include "DomainMapper.hxx"
#include <rtl/math.hxx>
@@ -575,7 +576,7 @@ void DomainMapperTableManager::endOfRowAction()
TagLogger::getInstance().endElement();
#endif
- m_nTableWidth += *aCellIter++;
+ m_nTableWidth = o3tl::saturating_add(m_nTableWidth, *aCellIter++);
}
if (m_nTableWidth > 0 && !m_bTableSizeTypeInserted)