sw/source/core/doc/gctable.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 0fda9371ce530d1c79e6eb404afd7127371f7975
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 17 10:53:27 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Sep 17 20:31:31 2024 +0200

    cid#1608032 Overflowed constant
    
    Change-Id: I4b74a139483ff932e71102ec73ab6d352e533245
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173554
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 30937cadd541..2c207ede9364 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -441,9 +441,16 @@ static bool lcl_MergeGCLine(SwTableLine* pLn, GCLinePara* 
pGCPara)
         }
 
         // ATTENTION: The number of boxes can change!
-        for( SwTableBoxes::size_type nLen = 0; nLen < 
pLn->GetTabBoxes().size(); ++nLen )
+        SwTableBoxes::size_type nLen = 0;
+        while (nLen < pLn->GetTabBoxes().size())
+        {
             if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara ))
+            {
                 --nLen;
+                continue;
+            }
+            ++nLen;
+        }
     }
     return true;
 }

Reply via email to