sc/source/filter/rtf/eeimpars.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8379aaee531e469687aaceba27f5afd697a0d86d
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Apr 5 10:46:40 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Apr 5 15:39:23 2024 +0200

    ofz#67765 Integer-overflow
    
    Change-Id: I49b1a5024352575a3867500c15f542863c273e93
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165814
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index 38f3f73e89aa..e6f1072f3fbe 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -309,7 +309,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, 
double nOutputFactor, SvNu
                         ScMF::Hor );
                 if ( pE->nRowOverlap > 1 )
                 {
-                    nRO = nRow + (pE->nRowOverlap - 1);
+                    nRO = o3tl::saturating_add(nRow, pE->nRowOverlap - 1);
                     mpDoc->ApplyFlagsTab( nCol, nRow+1,
                         nCol, nRO , nTab,
                         ScMF::Ver );

Reply via email to