diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-25 15:05:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-25 17:55:10 +0100 |
commit | 3d4a0e5cf5b7dca6a62508521849ac3908c2af05 (patch) | |
tree | 4b94f8f3b57d79b6e5016b2fac4aec05abdf92a6 | |
parent | 77ef84ef7251004e0c581174929a1eb551112ec3 (diff) |
ofz#4422 Integer-overflow
Change-Id: I1f3a09e34253de7f7a221e2c88d61c293cb69d03
Reviewed-on: https://gerrit.libreoffice.org/45271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 2b150e365456..e0ba76552c61 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -85,7 +85,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellRef& xCell, const CellPo if( ((sal_Int32)maRows.size()) <= aPos.mnRow ) break; - height += maRows[aPos.mnRow++].mnSize; + height = o3tl::saturating_add(height, maRows[aPos.mnRow++].mnSize); nRowSpan--; } @@ -96,7 +96,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellRef& xCell, const CellPo if( ((sal_Int32)maColumns.size()) <= aPos.mnCol ) break; - width += maColumns[aPos.mnCol++].mnSize; + width = o3tl::saturating_add(width, maColumns[aPos.mnCol++].mnSize); nColSpan--; } } |