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

New commits:
commit d7f0ffaaae601ec514e722ff99c14d9bf6b999e5
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: Tue Apr 2 20:45:32 2024 +0200

    ofz: negative column offset
    
    Change-Id: Ieeb06e5c5d28f1c457db369a732bc37a7d5f2be8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165420
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index c90cc1be4ad7..f00e1f868bb6 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -841,6 +841,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