sc/source/filter/oox/sheetdatacontext.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f7c6394bf21a3311cbfb5e80f87e6067e09add0b
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Sep 11 08:55:05 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 11 15:44:53 2024 +0200

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

diff --git a/sc/source/filter/oox/sheetdatacontext.cxx 
b/sc/source/filter/oox/sheetdatacontext.cxx
index a6374c577a26..b90f1fc5eb52 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -301,7 +301,9 @@ void SheetDataContext::importRow( const AttributeList& 
rAttribs )
     {
         std::u16string_view aColSpanToken = o3tl::getToken(aColSpansText, 0, ' 
', nIndex );
         size_t nSepPos = aColSpanToken.find( ':' );
-        if( (0 < nSepPos) && (nSepPos + 1 < aColSpanToken.size()) )
+        if (nSepPos == std::u16string_view::npos)
+            continue;
+        if (nSepPos > 0 && (nSepPos + 1 < aColSpanToken.size()))
         {
             // OOXML uses 1-based integer column indexes, row model expects 
0-based colspans
             const sal_Int32 nCol1 = o3tl::toInt32(aColSpanToken.substr( 0, 
nSepPos )) - 1;

Reply via email to