[Libreoffice-commits] core.git: svx/source

Caolán McNamara caolanm at redhat.com
Tue Feb 6 20:27:37 UTC 2018


 svx/source/table/tablelayouter.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68b1385af6413901b5172124e110a0cc2a849c56
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 6 14:40:02 2018 +0000

    ofz#5949 Integer-overflow
    
    Change-Id: Ib1d39e6c80a579752aedd1ca0b41595192cfbbfc
    Reviewed-on: https://gerrit.libreoffice.org/49303
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 }


More information about the Libreoffice-commits mailing list