svx/source/table/tablemodel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 3c8a6b0a183e5fa78024b5e0bb83584269068c3e Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 22 15:54:07 2018 +0000 ofz#7065 Integer-overflow Change-Id: Ic8837d21d64dc6fd3623ab5d32bc902e6c34dd21 Reviewed-on: https://gerrit.libreoffice.org/51746 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 224d6280b4a1..033af2477a45 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -1028,7 +1028,7 @@ void TableModel::optimize() Reference< XPropertySet > xSet2( static_cast< XCellRange* >( maRows[nRow-1].get() ), UNO_QUERY_THROW ); xSet1->getPropertyValue( sHeight ) >>= nHeight1; xSet2->getPropertyValue( sHeight ) >>= nHeight2; - nHeight1 += nHeight2; + nHeight1 = o3tl::saturating_add(nHeight1, nHeight2); xSet2->setPropertyValue( sHeight, Any( nHeight1 ) ); } catch( Exception& ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits