sw/source/core/unocore/XMLRangeHelper.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e5321f46d175e827924a8040f6325cdcd7d751f
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Sep 29 12:18:09 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 29 18:05:24 2024 +0200

    cid#1606810 Overflowed constant
    
    Change-Id: I831acf42054d16d16714ff3ec46eefbfaa24047e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174180
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx 
b/sw/source/core/unocore/XMLRangeHelper.cxx
index 6464543d51ca..ad2d56bd19d5 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -129,8 +129,9 @@ void lcl_getSingleCellAddressFromXMLString(
         rOutCell.bRelativeRow = true;
 
     // parse rest for column
+    assert(i <= 6);
     sal_Int32 nPower = 1;
-    while( rtl::isAsciiAlpha( pStrArray[ i ] ))
+    while( i >= 0 && rtl::isAsciiAlpha( pStrArray[ i ] ))
     {
         nColumn += (pStrArray[ i ] - aLetterA + 1) * nPower;
         i--;

Reply via email to