sc/source/core/tool/chartpos.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit aea48c1eb8f42ba620008a1b2119f80dbbb9c4ba
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Sep 28 14:41:33 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Sep 28 18:08:41 2024 +0200

    cid#1607751 Overflowed constant
    
    help out coverity by asserting what should be true here
    
    Change-Id: I1c98c29cccf0fd40eb6cc19699428872a5bf56a3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174111
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 780b8f4ac982..51736ecd23a3 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -142,6 +142,7 @@ void ScChartPositioner::GlueState()
         if ( i < nRanges )
             pR = &(*aRangeListRef)[i];
     }
+    assert(nEndCol >= nStartCol);
     SCCOL nC = nEndCol - nStartCol + 1;
     if ( nC == 1 )
     {

Reply via email to