sc/source/filter/html/htmlpars.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 3f8c81f3f9ba1e27c97894c73e8802e5fdecf94b
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Mar 28 09:09:00 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Mar 28 12:08:59 2024 +0100

    ofz: negative column offset
    
    Change-Id: Ieeb06e5c5d28f1c457db369a732bc37a7d5f2be8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165419
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index f1ec9f412056..929eed83d6fa 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -747,6 +747,11 @@ void ScHTMLLayoutParser::SetWidths()
                 OSL_ENSURE( nCol < nColsPerRow, 
"ScHTMLLayoutParser::SetWidths: column overflow" );
                 if (nCol >= nColsPerRow)
                     continue;
+                if (nCol < 0)
+                {
+                    SAL_WARN("sc", "negative offset: " << nCol);
+                    continue;
+                }
                 pE->nOffset = pOffsets[nCol];
                 nCol = nCol + pE->nColOverlap;
                 if ( nCol > nColsPerRow )

Reply via email to