summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-06 14:40:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-06 21:27:15 +0100
commit68b1385af6413901b5172124e110a0cc2a849c56 (patch)
treebdf7b05dd67dc1067e327f9228e2e73c4549a9e6 /svx/source/table
parent42c58f1c0ca4d310834f561f9145df340a893af1 (diff)
ofz#5949 Integer-overflow
Change-Id: Ib1d39e6c80a579752aedd1ca0b41595192cfbbfc Reviewed-on: https://gerrit.libreoffice.org/49303 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 'svx/source/table')
-rw-r--r--svx/source/table/tablelayouter.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 9bca986844c3..6b598c986687 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -499,7 +499,7 @@ sal_Int32 TableLayouter::distribute( LayoutVector& rLayouts, sal_Int32 nDistribu
sal_Int32 nSize = 0;
for( nIndex = 0; nIndex < nCount; ++nIndex )
- nSize += rLayouts[nIndex].mnSize;
+ nSize = o3tl::saturating_add(nSize, rLayouts[nIndex].mnSize);
return nSize;
}